From 78ab153734b9c4f0c45e6a0c4a9cf90acf37ff7a Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Tue, 2 Jul 2019 12:00:52 +0200 Subject: [PATCH 1/5] Fixed flaky tests because of license cache --- api/tests/conftest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/tests/conftest.py b/api/tests/conftest.py index a1baedcc6..d87e39374 100644 --- a/api/tests/conftest.py +++ b/api/tests/conftest.py @@ -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 From b20b1accffe02b920fff77c6594aa28dbab85017 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Tue, 2 Jul 2019 13:37:10 +0200 Subject: [PATCH 2/5] Fixed front-error with undefined currentTrack --- front/src/components/audio/album/Card.vue | 2 +- front/src/components/audio/track/Row.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/front/src/components/audio/album/Card.vue b/front/src/components/audio/album/Card.vue index db6e8de6b..1012cc578 100644 --- a/front/src/components/audio/album/Card.vue +++ b/front/src/components/audio/album/Card.vue @@ -20,7 +20,7 @@ - + diff --git a/front/src/components/audio/track/Row.vue b/front/src/components/audio/track/Row.vue index 90d057960..624467f21 100644 --- a/front/src/components/audio/track/Row.vue +++ b/front/src/components/audio/track/Row.vue @@ -1,7 +1,7 @@