Skip to content

Commit

Permalink
test: scaffold a test app
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Oct 13, 2023
1 parent 53b6bc4 commit cf5218f
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from __future__ import annotations

from pathlib import Path

BASE_DIR = Path(__file__).resolve().parent

SECRET_KEY = "NOTASECRET" # noqa S105

DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
"ATOMIC_REQUESTS": True,
},
}

TIME_ZONE = "UTC"

INSTALLED_APPS = [
"tests.testapp",
"remake_migrations",
# Force django_migrations creation by having an app with migrations:
"django.contrib.contenttypes",
]

USE_TZ = True
Empty file added tests/testapp/__init__.py
Empty file.
8 changes: 8 additions & 0 deletions tests/testapp/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from __future__ import annotations

from django.apps import AppConfig


class TestAppConfig(AppConfig):
name = "tests.testapp"
verbose_name = "Test App"
7 changes: 7 additions & 0 deletions tests/testapp/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from __future__ import annotations

from django.db import models


class Book(models.Model):
pass

0 comments on commit cf5218f

Please sign in to comment.