Skip to content

Commit a076bea

Browse files
committed
Fix error message
1 parent ea47a46 commit a076bea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

aiohttp/multidict.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ class MultiDict(abc.Mapping):
1515

1616
def __init__(self, *args, **kwargs):
1717
if len(args) > 1:
18-
raise TypeError("MultiDict takes at most 2 positional "
19-
"arguments ({} given)".format(len(args) + 1))
18+
raise TypeError("MultiDict takes at most 1 positional "
19+
"argument ({} given)".format(len(args)))
2020
self._items = []
2121
if args:
2222
if hasattr(args[0], 'items'):

tests/test_multidict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_instantiate__empty(self):
2121
self.assertEqual(list(d.items(getall=True)), [])
2222

2323
self.assertNotEqual(self.make_dict(), list())
24-
with self.assertRaisesRegex(TypeError, "\(3 given\)"):
24+
with self.assertRaisesRegex(TypeError, "\(2 given\)"):
2525
self.make_dict(('key1', 'value1'), ('key2', 'value2'))
2626

2727
def test_instantiate__from_arg0(self):

0 commit comments

Comments
 (0)