This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
authentic2-auth-fc/tests/conftest.py

21 lines
450 B
Python

import pytest
import django_webtest
@pytest.fixture
def app(request, db):
wtm = django_webtest.WebTestMixin()
wtm._patch_settings()
request.addfinalizer(wtm._unpatch_settings)
return django_webtest.DjangoTestApp(extra_environ={'HTTP_HOST': 'localhost'})
@pytest.fixture
def fc_settings(settings):
settings.A2_FC_ENABLE = True
settings.A2_FC_CLIENT_ID = 'xxx'
settings.A2_FC_CLIENT_SECRET = 'yyy'
return settings