feat(api): split api into multiple apps (#1626)

Fixes #1622

- split the api into 4 apps: core, history, schedule, storage
- exploded the settings into testing/prod
This commit is contained in:
Jonas L 2022-04-04 14:38:50 +02:00 committed by GitHub
parent 87d2da9d84
commit fce988aef1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
120 changed files with 1499 additions and 1078 deletions

View file

@ -6,13 +6,13 @@ from django.contrib.auth.models import AnonymousUser
from model_bakery import baker
from rest_framework.test import APIRequestFactory, APITestCase
from libretime_api.models.user_constants import ADMIN, DJ, GUEST, PROGRAM_MANAGER
from libretime_api.permission_constants import (
from ..core.models import ADMIN, DJ, GUEST, PROGRAM_MANAGER
from ..permission_constants import (
DJ_PERMISSIONS,
GUEST_PERMISSIONS,
PROGRAM_MANAGER_PERMISSIONS,
)
from libretime_api.permissions import IsSystemTokenOrUser
from ..permissions import IsSystemTokenOrUser
class TestIsSystemTokenOrUser(APITestCase):
@ -109,7 +109,7 @@ class TestPermissions(APITestCase):
first_name="test",
last_name="user",
)
f = baker.make("libretime_api.File", owner=user)
f = baker.make("storage.File", owner=user)
model = f"files/{f.id}"
path = self.path.format(model)
self.client.login(username="test-dj", password="test")
@ -125,7 +125,7 @@ class TestPermissions(APITestCase):
first_name="test",
last_name="user",
)
f = baker.make("libretime_api.File")
f = baker.make("storage.File")
model = f"files/{f.id}"
path = self.path.format(model)
self.client.login(username="test-dj", password="test")