summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2011-10-11 14:55:40 +0100
committerMichael Foord <michael@voidspace.org.uk>2011-10-11 14:55:40 +0100
commite4384d243f285cccb9cfe303ae6d8c47f726d752 (patch)
tree2f0d5fc7fad5ce817aa8b241524b261c71e27ce7 /tests
parent519b951ea235a362b46fa4ccd98ddd85c96b7493 (diff)
downloadmock-e4384d243f285cccb9cfe303ae6d8c47f726d752.tar.gz
Documentation update and failing test for create_autospec
Diffstat (limited to 'tests')
-rw-r--r--tests/testhelpers.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/testhelpers.py b/tests/testhelpers.py
index 6e2530c..c9c4050 100644
--- a/tests/testhelpers.py
+++ b/tests/testhelpers.py
@@ -646,6 +646,11 @@ class SpecSignatureTest(unittest2.TestCase):
mock.assert_called_once_with()
self.assertRaises(TypeError, mock, 'a')
+ instance = mock()
+ self.assertRaises(TypeError, instance)
+ instance(a='a')
+ instance.assert_called_once_with(a='a')
+
mock = create_autospec(Callable())
mock(a='a')
mock.assert_called_once_with(a='a')