Skip to content

Commit

Permalink
[fix]: Adding pytest-mock to test dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
hentt30 committed Jul 20, 2021
1 parent f248e37 commit c7abda9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ skipsdist=True
deps=
pytest>=6.2.1
numpy>=1.19.4
pytest-mock
usedevelop=True
commands=
pytest
Expand Down
5 changes: 2 additions & 3 deletions tests/unit/handlers/test_base_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ def test_handle_when_next_handler_is_defined(mocker: MockerFixture):
mocker.patch.object(next_handler,
'handle',
return_value='Test',
autospec=True)
spy = mocker.spy(next_handler, 'handle')
autospec=True,
wraps=next_handler.handle)

base_handler.set_next(next_handler)

assert base_handler.handle({}) == 'Test'
assert spy.assert_called_once_with({})

0 comments on commit c7abda9

Please sign in to comment.