blob: ea7d23ddaca25d1111dbef324db1e535837844f8 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 | import os
from django.conf import settings
def pytest_configure(config):
    PROJECT_ROOT = os.path.dirname(__file__)
    if not settings.configured:
        settings.configure(
            DATABASES={
                'default': {
                    'ENGINE': 'django.db.backends.sqlite3',
                    'NAME': ':memory:',
                },
            },
            DEBUG=False,
            INSTALLED_APPS=[
                'pykss.contrib.django',
            ],
            PROJECT_ROOT=PROJECT_ROOT,
            TEMPLATE_DEBUG=True,
            TEMPLATE_DIRS=[os.path.join(PROJECT_ROOT, 'tests', 'templates')],
        )
 |