Lines Matching defs:attribute

99             attribute = sentinel.Original
101 @patch.object(Something, 'attribute', sentinel.Patched)
103 self.assertEqual(Something.attribute, sentinel.Patched, "unpatched")
106 self.assertEqual(Something.attribute, sentinel.Original,
116 attribute = sentinel.Original
118 @patch.object(Something, 'attribute', None)
120 self.assertIsNone(Something.attribute, "unpatched")
123 self.assertEqual(Something.attribute, sentinel.Original,
129 attribute = sentinel.Original
132 @patch.object(Something, 'attribute', sentinel.Patched)
135 self.assertEqual(Something.attribute, sentinel.Patched,
141 self.assertEqual(Something.attribute, sentinel.Original,
318 # Should not raise attribute error
330 # Should not raise attribute error
344 # Should not raise attribute error
448 attribute = sentinel.Original
452 self.assertEqual(Something.attribute, sentinel.Patched,
455 self.assertEqual(Something.attribute, sentinel.Original,
458 Foo = patch.object(Something, 'attribute', sentinel.Patched)(Foo)
464 self.assertEqual(Something.attribute, sentinel.Original,
470 attribute = sentinel.Original
488 self.assertEqual(Something.attribute, sentinel.Original,
496 attribute = sentinel.Original
499 @patch.object(Something, 'attribute', sentinel.Patched)
500 @patch.object(Something, 'attribute', sentinel.Patched)
502 self.assertEqual(Something.attribute, sentinel.Patched, "unpatched")
506 self.assertEqual(Something.attribute, sentinel.Original,
1708 getter, attribute = _get_target(target)
1710 getter, attribute, DEFAULT, None, False, None,
1766 # no spec should have been set, so attribute access should not fail
1837 def get_patch(attribute):
1840 stopped.append(attribute)
1842 return mypatch(lambda: thing, attribute, None, None,