def test_resolve_id(self):
     target = "test_id"
     class Obj_with_id(object):
         id = target
     obj = Obj_with_id()
     self.assertEqual(_resolve_id(obj), target)
     self.assertEqual(_resolve_id(obj), target)
     self.assertEqual(_resolve_id(obj.id), target)
Пример #2
0
    def test_resolve_id(self):
        target = "test_id"

        class Obj_with_id(object):
            id = target

        obj = Obj_with_id()
        self.assertEqual(_resolve_id(obj), target)
        self.assertEqual(_resolve_id(obj), target)
        self.assertEqual(_resolve_id(obj.id), target)