#88 #89 : use pytest + reorganise settings (#92)

- !88 pytest on existing tests
- !89 reorganise settings (! see notes for deployment)

Co-authored-by: bkfox <thomas bkfox net>
Reviewed-on: rc/aircox#92
This commit is contained in:
Thomas Kairos
2023-03-28 14:40:49 +02:00
parent 4bebc56a28
commit 0e183099ed
31 changed files with 511 additions and 368 deletions

42
instance/settings/dev.py Executable file
View File

@ -0,0 +1,42 @@
import os
from .base import *
try:
from .settings import *
except ImportError:
pass
LOCALE_PATHS = ["aircox/locale", "aircox_streamer/locale"]
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"timestamp": {
"format": "{asctime} {levelname} {message}",
"style": "{",
},
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"formatter": "timestamp",
},
},
"loggers": {
"aircox": {
"handlers": ["console"],
"level": os.getenv("DJANGO_LOG_LEVEL", "DEBUG"),
},
"aircox.commands": {
"handlers": ["console"],
"level": os.getenv("DJANGO_LOG_LEVEL", "DEBUG"),
},
"aircox.test": {
"handlers": ["console"],
"level": os.getenv("DJANGO_LOG_LEVEL", "DEBUG"),
},
},
}