Fixed flaky tests because of license cache

environments/review-front-brok-oyrjvg/deployments/2100
Eliot Berriot 2019-07-02 12:00:52 +02:00
rodzic d5cb412a47
commit 78ab153734
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -29,6 +29,7 @@ from rest_framework.test import APIClient, APIRequestFactory
from funkwhale_api.activity import record
from funkwhale_api.federation import actors
from funkwhale_api.music import licenses
pytest_plugins = "aiohttp.pytest_plugin"
@ -422,3 +423,10 @@ def a_responses():
@pytest.fixture
def service_actor(db):
return actors.get_service_actor()
@pytest.fixture(autouse=True)
def clear_license_cache(db):
licenses._cache = None
yield
licenses._cache = None