aboutsummaryrefslogtreecommitdiffstats
path: root/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'conftest.py')
-rw-r--r--conftest.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/conftest.py b/conftest.py
new file mode 100644
index 0000000..ea7d23d
--- /dev/null
+++ b/conftest.py
@@ -0,0 +1,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')],
+ )