def test_unsignedID(self):
        foo = object()
        bar = object()

        # A fake object identity mapping
        objects = {foo: 17, bar: -73}
        def fakeId(obj):
            return objects[obj]

        util.setIDFunction(fakeId)

        self.assertEqual(util.unsignedID(foo), 17)
        self.assertEqual(util.unsignedID(bar), (sys.maxint + 1) * 2 - 73)
Find the item with the specified id.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/test/test_util.py/UnsignedIDTests.test_unsignedID--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/action/group.py/Group.find