Lines Matching full:something
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")
123 self.assertEqual(Something.attribute, sentinel.Original,
128 class Something(object): class
132 @patch.object(Something, 'attribute', sentinel.Patched)
133 @patch.object(Something, 'next_attribute', sentinel.Patched2)
135 self.assertEqual(Something.attribute, sentinel.Patched,
137 self.assertEqual(Something.next_attribute, sentinel.Patched2,
141 self.assertEqual(Something.attribute, sentinel.Original,
143 self.assertEqual(Something.next_attribute, sentinel.Original2,
148 global something
149 original = something
150 @patch('%s.something' % __name__, sentinel.Something2)
155 something = sentinel.replacement_value
157 self.assertEqual(something, sentinel.replacement_value)
159 something = original
163 @patch('%s.something' % __name__, sentinel.Something2)
165 self.assertEqual(PTModule.something, sentinel.Something2,
169 self.assertEqual(PTModule.something, sentinel.Something,
172 @patch('%s.something' % __name__, sentinel.Something2)
175 self.assertEqual(PTModule.something, sentinel.Something2,
180 self.assertEqual(PTModule.something, sentinel.Something,
188 self.assertEqual(PTModule.something, sentinel.Something,
219 something = sentinel.Original variable in PatchTest.test_patchobject_with_default_mock.Test
222 @patch.object(Test, 'something')
224 self.assertEqual(mock, Test.something,
231 @patch.object(Test, 'something')
240 self.assertEqual(mock2, Test.something,
447 class Something(object): class
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,
469 class Something(object): class
477 self.assertEqual(PTModule.something, mock_something,
480 self.assertEqual(PTModule.something, sentinel.Something,
482 Foo = patch('%s.something' % __name__)(Foo)
488 self.assertEqual(Something.attribute, sentinel.Original,
490 self.assertEqual(PTModule.something, sentinel.Something,
495 class Something(object): class
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,
511 foo = {'initial': object(), 'other': 'something'}
518 foo['other'] = 'something else'
546 foo['other'] = 'something'
554 foo['other'] = 'something else'
571 foo = {'initial': object(), 'other': 'something'}
578 foo['other'] = 'something else'
604 foo['other'] = 'something'
612 foo['other'] = 'something else'
719 original = something
720 patcher = patch('%s.something' % __name__)
721 self.assertIs(something, original)
725 self.assertIs(something, mock)
728 self.assertIs(something, original)
747 original = something
748 patcher = patch.object(PTModule, 'something', 'foo')
749 self.assertIs(something, original)
753 self.assertIs(something, replaced)
756 self.assertIs(something, original)
813 class Something(object): class
818 for thing in Something, SomethingElse, Something(), SomethingElse:
831 class Something(object): class
836 for thing in Something, SomethingElse, Something(), SomethingElse:
837 proxy = _get_proxy(Something, get_only=False)
1759 'doesnotexist', 'something')
1789 patch('os.unlink', something).start()
1853 patch('os.unlink', something).start()