See #578: added opengraph and oembed data on artist / album / track urls

This commit is contained in:
Eliot Berriot 2018-12-19 14:04:26 +01:00
parent 815d729367
commit 9220b2f0f1
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
14 changed files with 867 additions and 21 deletions

View file

@ -13,7 +13,7 @@ import factory
import pytest
from django.contrib.auth.models import AnonymousUser
from django.core.cache import cache as django_cache
from django.core.cache import cache as django_cache, caches
from django.core.files import uploadedfile
from django.utils import timezone
from django.test import client
@ -100,6 +100,12 @@ def cache():
django_cache.clear()
@pytest.fixture(autouse=True)
def local_cache():
yield caches["local"]
caches["local"].clear()
@pytest.fixture
def factories(db):
"""
@ -382,3 +388,15 @@ def temp_signal(mocker):
@pytest.fixture()
def stdout():
yield io.StringIO()
@pytest.fixture
def spa_html(r_mock, settings):
yield r_mock.get(
settings.FUNKWHALE_SPA_HTML_ROOT + "index.html", text="<head></head>"
)
@pytest.fixture
def no_api_auth(preferences):
preferences["common__api_authentication_required"] = False