summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/testmock/testmock.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/test/testmock/testmock.py')
-rw-r--r--Lib/unittest/test/testmock/testmock.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py
index 64fd1a1..2c6f128 100644
--- a/Lib/unittest/test/testmock/testmock.py
+++ b/Lib/unittest/test/testmock/testmock.py
@@ -463,6 +463,13 @@ class MockTest(unittest.TestCase):
mock.assert_called_with)
+ def test_assert_called_once_with_message(self):
+ mock = Mock(name='geoffrey')
+ self.assertRaisesRegex(AssertionError,
+ r"Expected 'geoffrey' to be called once\.",
+ mock.assert_called_once_with)
+
+
def test__name__(self):
mock = Mock()
self.assertRaises(AttributeError, lambda: mock.__name__)