Closed as not planned
Closed as not planned
Description
Bug report
When using mock.call
to check the calls of mock.Mock
instance with dictionary arguments, there seems to be a bug:
from mock import Mock, call
mock = Mock()
arg = {}
mock(arg)
arg['el'] = 1
mock.assert_has_calls({}) # This raises assertion exception
"""
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/python37/lib/python3.7/site-packages/mock/mock.py", line 969, in assert_has_calls
), cause)
File "<string>", line 3, in raise_from
AssertionError: Calls not found.
Expected: [call({})]
Actual: [call({'el': 1})]
"""
I thought the last assertion should not create an exception
Your environment
- CPython versions, Operating system tested on: 3.9.7 (mac os 12.4), 3.7.13 (ubuntu 20.04)