summaryrefslogtreecommitdiff
path: root/tests/django_test_app/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/django_test_app/__init__.py')
-rw-r--r--tests/django_test_app/__init__.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/django_test_app/__init__.py b/tests/django_test_app/__init__.py
index e69de29..1c692b0 100644
--- a/tests/django_test_app/__init__.py
+++ b/tests/django_test_app/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2012-2014 The python-semanticversion project
+# This code is distributed under the two-clause BSD License.
+
+try: # pragma: no cover
+ from django.conf import settings
+ django_loaded = True
+except ImportError: # pragma: no cover
+ django_loaded = False
+
+
+if django_loaded: # pragma: no cover
+ if not settings.configured:
+ settings.configure(
+ DATABASES={
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': 'tests/db/test.sqlite',
+ }
+ },
+ INSTALLED_APPS=[
+ 'tests.django_test_app',
+ ]
+ )