Skip to content
Snippets Groups Projects
Verified Commit 21259cc6 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fixed flaky tests because of license cache

parent 4ad3d10d
No related branches found
No related tags found
No related merge requests found
......@@ -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
from funkwhale_api.moderation import mrf
......@@ -437,3 +438,10 @@ def mrf_outbox_registry(mocker):
registry = mrf.Registry()
mocker.patch("funkwhale_api.moderation.mrf.outbox", registry)
return registry
@pytest.fixture(autouse=True)
def clear_license_cache(db):
licenses._cache = None
yield
licenses._cache = None
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment