diff options
author | Michael Foord <michael@voidspace.org.uk> | 2011-10-11 14:55:40 +0100 |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2011-10-11 14:55:40 +0100 |
commit | e4384d243f285cccb9cfe303ae6d8c47f726d752 (patch) | |
tree | 2f0d5fc7fad5ce817aa8b241524b261c71e27ce7 /tests | |
parent | 519b951ea235a362b46fa4ccd98ddd85c96b7493 (diff) | |
download | mock-e4384d243f285cccb9cfe303ae6d8c47f726d752.tar.gz |
Documentation update and failing test for create_autospec
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testhelpers.py | 5 |
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') |