Merge branch 'flaky-tests' into 'develop'
Fixed flaky tests because of license cache See merge request funkwhale/funkwhale!815
This commit is contained in:
commit
98c6e10351
|
@ -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
|
||||||
from funkwhale_api.moderation import mrf
|
from funkwhale_api.moderation import mrf
|
||||||
|
|
||||||
|
|
||||||
|
@ -437,3 +438,10 @@ def mrf_outbox_registry(mocker):
|
||||||
registry = mrf.Registry()
|
registry = mrf.Registry()
|
||||||
mocker.patch("funkwhale_api.moderation.mrf.outbox", registry)
|
mocker.patch("funkwhale_api.moderation.mrf.outbox", registry)
|
||||||
return registry
|
return registry
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def clear_license_cache(db):
|
||||||
|
licenses._cache = None
|
||||||
|
yield
|
||||||
|
licenses._cache = None
|
||||||
|
|
Loading…
Reference in New Issue