diff options
| author | Sean Brant | 2013-03-10 22:48:15 -0500 | 
|---|---|---|
| committer | Sean Brant | 2013-03-10 22:48:15 -0500 | 
| commit | 63ff8bab7cf4b818da6e50251f8a79cf1e1209d8 (patch) | |
| tree | 655caff061bdbdb081c450a65f368798819ef7cc /conftest.py | |
| parent | 9ad7a3fc99ecd77e215a9422fd05ed5da6a3f841 (diff) | |
| download | pykss-63ff8bab7cf4b818da6e50251f8a79cf1e1209d8.tar.bz2 | |
Adds tests for django template tag
Diffstat (limited to 'conftest.py')
| -rw-r--r-- | conftest.py | 23 | 
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')], +        ) | 
