def testRender(self):

        widget = S3FilterWidget(["name", "organisation_id$name"])

        # Override widget renderer
        widget.widget = lambda resource, values: ""

        resource = current.s3db.resource("org_office")

        output = widget(resource, get_vars={})
        self.assertTrue(isinstance(output[0], INPUT))

        # Check attributes of the hidden data element
        attr = output[0].attributes

        t = attr["_type"]
        self.assertEqual(t, "hidden")

        c = attr["_class"]
        # Generic class
        self.assertTrue("filter-widget-data" in c)
        # Widget-type-specific class
        self.assertTrue("%s-data" % widget._class in c)

        i = attr["_id"]
        self.assertEqual(i, "%s-org_office_name-org_organisation_name-%s-data" %
                        (resource.alias, widget._class))

        v = attr["_value"]
        self.assertEqual(v, "~.name|~.organisation_id$name")
Wrapper around C{os.getrandbits}.
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3filter.py/S3FilterWidgetTests.testRender--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/python/randbytes.py/RandomFactory._randBits