Lines Matching refs:assert_called_with
41 ``True``. More importantly we can use the :meth:`~Mock.assert_called_with` or
83 >>> mock.close.assert_called_with()
87 accessing it in the test will create it, but :meth:`~Mock.assert_called_with`
298 >>> mock.assert_called_with(a=1, b=2, c=3)
357 >>> mock.assert_called_with('filename', 'r')
388 ... mock_method.assert_called_with()
433 >>> mock_method.assert_called_with(1, 2, 3)
464 >>> mock.return_value.foo.assert_called_with(a=2, b=3)
711 >>> mock.foo_bar.assert_called_with('baz', spam='eggs')
724 Both ``assert_called_with`` and ``assert_called_once_with`` make assertions about
773 >>> mock_frob.assert_called_with({6})
808 >>> new_mock.assert_called_with({6})
847 >>> c.assert_called_with(set())
848 >>> c.assert_called_with(arg)
1198 defined classes). To use :meth:`~Mock.assert_called_with` we would need to pass
1203 You can see in this example how a 'standard' call to ``assert_called_with`` isn't
1212 >>> mock.assert_called_with(Foo(1, 2))
1244 >>> mock.assert_called_with(match_foo)
1247 we want to compare against. In ``assert_called_with`` the ``Matcher`` equality
1250 ``assert_called_with`` passes, and if they don't an :exc:`AssertionError` is raised:
1253 >>> mock.assert_called_with(match_wrong)