Skip to content

Commit 47e46ee

Browse files
committed
Move reset_token_cache to contrib fixtures
1 parent 2c54e5c commit 47e46ee

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/commercetools/contrib/pytest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
from commercetools.testing.server import Server
1010

1111

12+
@pytest.fixture(autouse=True)
13+
def reset_token_cache():
14+
from commercetools.utils import DefaultTokenSaver
15+
DefaultTokenSaver.clear_cache()
16+
17+
1218
@pytest.fixture()
1319
def commercetools_api():
1420
with backend_mocker() as m:

tests/conftest.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
pytest_plugins = ["commercetools.contrib.pytest"]
55

66

7-
@pytest.fixture(autouse=True)
8-
def reset_token_cache():
9-
from commercetools.utils import DefaultTokenSaver
10-
11-
DefaultTokenSaver.clear_cache()
12-
13-
147
@pytest.fixture
158
def client(commercetools_client):
169
return commercetools_client

0 commit comments

Comments
 (0)