| D | testpatch.py | 42 something = sentinel.Something variable 98 class Something(object): class 101 @patch.object(Something, 'attribute', sentinel.Patched) 103 self.assertEqual(Something.attribute, sentinel.Patched, "unpatched") 106 self.assertEqual(Something.attribute, sentinel.Original, 110 msg = "'Something' must be the actual object to be patched, not a str" 112 patch.object('Something', 'do_something') 115 class Something(object): class 118 @patch.object(Something, 'attribute', None) 120 self.assertIsNone(Something.attribute, "unpatched") [all …]
|