Fixed flaky tests because of license cache
This commit is contained in:
parent
d5cb412a47
commit
78ab153734
|
@ -29,6 +29,7 @@ from rest_framework.test import APIClient, APIRequestFactory
|
||||||
|
|
||||||
from funkwhale_api.activity import record
|
from funkwhale_api.activity import record
|
||||||
from funkwhale_api.federation import actors
|
from funkwhale_api.federation import actors
|
||||||
|
from funkwhale_api.music import licenses
|
||||||
|
|
||||||
|
|
||||||
pytest_plugins = "aiohttp.pytest_plugin"
|
pytest_plugins = "aiohttp.pytest_plugin"
|
||||||
|
@ -422,3 +423,10 @@ def a_responses():
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def service_actor(db):
|
def service_actor(db):
|
||||||
return actors.get_service_actor()
|
return actors.get_service_actor()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def clear_license_cache(db):
|
||||||
|
licenses._cache = None
|
||||||
|
yield
|
||||||
|
licenses._cache = None
|
||||||
|
|
Loading…
Reference in New Issue