summaryrefslogtreecommitdiff
path: root/Lib/unittest/test/testmock/testhelpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/test/testmock/testhelpers.py')
-rw-r--r--Lib/unittest/test/testmock/testhelpers.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/unittest/test/testmock/testhelpers.py b/Lib/unittest/test/testmock/testhelpers.py
index 34776347da..d5f9e7c1d6 100644
--- a/Lib/unittest/test/testmock/testhelpers.py
+++ b/Lib/unittest/test/testmock/testhelpers.py
@@ -306,6 +306,20 @@ class CallTest(unittest.TestCase):
other_args = _Call(((1, 2), {'a': 3}))
self.assertEqual(args, other_args)
+ def test_call_with_name(self):
+ self.assertEqual(
+ 'foo',
+ _Call((), 'foo')[0],
+ )
+ self.assertEqual(
+ '',
+ _Call((('bar', 'barz'), ), )[0]
+ )
+ self.assertEqual(
+ '',
+ _Call((('bar', 'barz'), {'hello': 'world'}), )[0]
+ )
+
class SpecSignatureTest(unittest.TestCase):