mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 18:09:17 +02:00
Ensures federation urls can answer to application/ld+json, application/activity+json and application/json requests
This commit is contained in:
parent
c9e7eea65b
commit
12c9db3960
19 changed files with 1294 additions and 1001 deletions
|
@ -22,6 +22,7 @@ from django.db import connection
|
|||
from django.db.migrations.executor import MigrationExecutor
|
||||
from django.db.models import QuerySet
|
||||
|
||||
from aioresponses import aioresponses
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
from rest_framework import fields as rest_fields
|
||||
from rest_framework.test import APIClient, APIRequestFactory
|
||||
|
@ -30,6 +31,9 @@ from funkwhale_api.activity import record
|
|||
from funkwhale_api.users.permissions import HasUserPermission
|
||||
|
||||
|
||||
pytest_plugins = "aiohttp.pytest_plugin"
|
||||
|
||||
|
||||
class FunkwhaleProvider(internet_provider.Provider):
|
||||
"""
|
||||
Our own faker data generator, since built-in ones are sometimes
|
||||
|
@ -416,3 +420,9 @@ def migrator(transactional_db):
|
|||
def rsa_small_key(settings):
|
||||
# smaller size for faster generation, since it's CPU hungry
|
||||
settings.RSA_KEY_SIZE = 512
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def a_responses():
|
||||
with aioresponses() as m:
|
||||
yield m
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue