test(api): conftest at top level for global fixture access (#2038)

This commit is contained in:
Jonas L 2022-08-10 12:36:56 +02:00 committed by GitHub
parent 4019367abc
commit 7082c9693d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,12 +0,0 @@
import pytest
from django.conf import settings
from rest_framework.test import APIClient
@pytest.fixture()
def api_client():
obj = APIClient()
obj.credentials(
HTTP_AUTHORIZATION=f"Api-Key {settings.CONFIG.general.api_key}",
)
return obj