Added API endpoint for listing public instance settings

This commit is contained in:
Eliot Berriot 2018-02-17 21:21:08 +01:00
parent 0944ef2a07
commit 6152b3bb36
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
7 changed files with 69 additions and 1 deletions

View file

@ -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']()