def test_called_with_args_and_kwargs(): """ Test that :py:func:`.assert_called_once` works with args and kwargs. """ m = Mock() m("test", test="test") assert_called_once(m, ("test",), {"test": "test"}) assert_called_once(m, expected_kwargs={"test": "test"}, expected_args=("test",))
def test_called_with_args_and_kwargs(): """ Test that :py:func:`.assert_called_once` works with args and kwargs. """ m = Mock() m('test', test='test') assert_called_once(m, ('test',), {'test': 'test'}) assert_called_once(m, expected_kwargs={'test': 'test'}, expected_args=('test',))
def test_called_with_only_args(): """ Test that :py:func:`.assert_called_once` works with only args. """ m = Mock() m("test") assert_called_once(m, ("test",)) assert_called_once(m, ("test",), {}) assert_called_once(m, expected_args=("test",)) assert_called_once(m, expected_kwargs={}, expected_args=("test",))
def test_called_with_only_args(): """ Test that :py:func:`.assert_called_once` works with only args. """ m = Mock() m('test') assert_called_once(m, ('test',)) assert_called_once(m, ('test',), {}) assert_called_once(m, expected_args=('test',)) assert_called_once(m, expected_kwargs={}, expected_args=('test',))
def test_called_with_only_kwargs(): """ Test that :py:func:`.assert_called_once` works with only kwargs. """ m = Mock() m(test="test") assert_called_once(m, (), {"test": "test"}) assert_called_once(m, expected_kwargs={"test": "test"}) assert_called_once(m, expected_kwargs={"test": "test"}, expected_args=())
def test_called_with_only_kwargs(): """ Test that :py:func:`.assert_called_once` works with only kwargs. """ m = Mock() m(test='test') assert_called_once(m, (), {'test': 'test'}) assert_called_once(m, expected_kwargs={'test': 'test'}) assert_called_once(m, expected_kwargs={'test': 'test'}, expected_args=())