Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

Commit

Permalink
Fix the tests for the new pytest-mock package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nolar committed Oct 5, 2019
1 parent d6bafae commit 17ceb52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ urllib3<1.25

# Everything needed to develop (test, debug) the framework.
pytest-asyncio
pytest-mock
pytest-mock>=1.11.1
pytest-cov
pytest
asynctest
Expand Down
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def _is_e2e(item):
# Substitute the regular mock with the async-aware mock in the `mocker` fixture.
@pytest.fixture(scope='session', autouse=True)
def enforce_asyncio_mocker():
pytest_mock._get_mock_module = lambda config: asynctest
pytest_mock.plugin._get_mock_module = lambda config: asynctest
pytest_mock._get_mock_module = pytest_mock.plugin._get_mock_module


@pytest.fixture()
Expand Down

0 comments on commit 17ceb52

Please sign in to comment.