generated from ludeeus/integration_blueprint
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb08df5
commit a0b6dd4
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
"""Fixtures for testing.""" | ||
from unittest import mock | ||
|
||
import pytest | ||
|
||
from tests import COE_VERSION_CHECK_PACKAGE | ||
|
||
|
||
@pytest.fixture(autouse=True) | ||
def auto_enable_custom_integrations(enable_custom_integrations): | ||
"""Enable enable_custom_integrations""" | ||
yield | ||
|
||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
def patch_coe_server_check(request): | ||
"""Patch the ta-cmi CoE server version check.""" | ||
patched = mock.patch(COE_VERSION_CHECK_PACKAGE) | ||
patched.__enter__() | ||
|
||
def unpatch(): | ||
patched.__exit__(None, None, None) | ||
|
||
request.addfinalizer(unpatch) |