Skip to content
Snippets Groups Projects
Commit 8c0ac7b1 authored by Michael Foord's avatar Michael Foord
Browse files

Enhanced mocksignature test

parent ff48ed79
No related branches found
No related tags found
No related merge requests found
......@@ -242,12 +242,14 @@ class TestMockSignature(unittest2.TestCase):
thing = something()
original = thing.meth
@patch.object(thing, 'meth', mocksignature=True)
def test(_):
thing.meth(1, 2, 3)
self.assertRaises(TypeError, thing.meth, 1)
test()
self.assertEqual(thing.meth, original)
# when patching instance methods using mocksignatures we
# replace the bound method with an instance attribute on
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment