""" Author: Michel Peltriaux Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany Contact: michel.peltriaux@sgdnord.rlp.de Created on: 27.01.22 """ from konova.settings import DEFAULT_GROUP from konova.tests.test_views import BaseTestCase class BaseAPIV1TestCase(BaseTestCase): @classmethod def setUpTestData(cls): super().setUpTestData() cls.superuser.get_API_token() cls.superuser.api_token.is_active = True cls.superuser.api_token.save() default_group = cls.groups.get(name=DEFAULT_GROUP) cls.superuser.groups.add(default_group) cls.header_data = { "HTTP_ksptoken": cls.superuser.api_token.token, } class APIV1CreateTestCase(BaseAPIV1TestCase): @classmethod def setUpTestData(cls): super().setUpTestData()