def test_resolve_name(self):
     target = "test_name"
     class Obj_with_name(object):
         name = target
     obj = Obj_with_name()
     self.assertEqual(_resolve_name(obj), target)
     self.assertEqual(_resolve_name(obj), target)
     self.assertEqual(_resolve_name(obj.name), target)
Пример #2
0
    def test_resolve_name(self):
        target = "test_name"

        class Obj_with_name(object):
            name = target

        obj = Obj_with_name()
        self.assertEqual(_resolve_name(obj), target)
        self.assertEqual(_resolve_name(obj), target)
        self.assertEqual(_resolve_name(obj.name), target)