-
Notifications
You must be signed in to change notification settings - Fork 1
/
conftest.py
47 lines (43 loc) · 1.29 KB
/
conftest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from pathlib import Path
from django.conf import settings
def pytest_configure():
base_dir = Path(".")
settings.configure(
BASE_DIR=base_dir,
SECRET_KEY="this-is-a-secret",
ROOT_URLCONF="tests.urls",
INSTALLED_APPS=[],
TEMPLATES=[
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": ["tests/templates"],
"OPTIONS": {
"context_processors": [
"django.template.context_processors.request",
],
},
}
],
CACHES={
"default": {
"BACKEND": "django.core.cache.backends.dummy.DummyCache",
}
},
LOGGING={
"version": 1,
"disable_existing_loggers": False,
"formatters": {},
"handlers": {
"django_rich_logging": {
"class": "django_rich_logging.logging.DjangoRequestHandler",
"level": "DEBUG",
},
},
"loggers": {
"django.server": {
"handlers": ["django_rich_logging"],
"level": "INFO",
},
},
},
)