mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 18:34:21 +02:00
Added API endpoint for listing public instance settings
This commit is contained in:
parent
0944ef2a07
commit
6152b3bb36
7 changed files with 69 additions and 1 deletions
|
@ -3,6 +3,7 @@ import shutil
|
|||
import pytest
|
||||
from django.core.cache import cache as django_cache
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
from rest_framework.test import APIClient
|
||||
|
||||
from funkwhale_api.taskapp import celery
|
||||
|
||||
|
@ -29,7 +30,9 @@ def factories(db):
|
|||
|
||||
@pytest.fixture
|
||||
def preferences(db):
|
||||
yield global_preferences_registry.manager()
|
||||
manager = global_preferences_registry.manager()
|
||||
manager.all()
|
||||
yield manager
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
@ -48,6 +51,11 @@ def logged_in_client(db, factories, client):
|
|||
delattr(client, 'user')
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def api_client(client):
|
||||
return APIClient()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def superuser_client(db, factories, client):
|
||||
user = factories['users.SuperUser']()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue