def testTypeOfListReferenceSingle(self):

        db = current.db

        uids = self.uids
        resource = current.s3db.resource("typeof_hierarchy_reference")

        # Test with single value
        expr = FS("typeof_hierarchy_multi_id").typeof(uids["HIERARCHY1"])
        query = expr.query(resource)

        table = resource.table
        expected = set(uids[uid] for uid in ("HIERARCHY1",
                                             "HIERARCHY1-1",
                                             "HIERARCHY1-1-1",
                                             "HIERARCHY1-1-2",
                                             "HIERARCHY1-2",
                                             "HIERARCHY1-2-1",
                                             "HIERARCHY1-2-2",
                                             ))
        found = self.inspect_multi_query(query,
                                         field = table.typeof_hierarchy_multi_id,
                                         conjunction = db._adapter.OR,
                                         op = db._adapter.CONTAINS)

        self.assertEqual(found, expected)

    # -------------------------------------------------------------------------
Test resolution of __typeof queries, for list:reference,
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3hierarchy.py/S3TypeOfTests.testTypeOfListReferenceSingle