summaryrefslogtreecommitdiff
path: root/tests/django_test_app/__init__.py
blob: 1c692b096a37c8078d82944e2ebef61bb69065aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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',
            ]
        )