forked from kmerenkov/django-elliptics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.py
30 lines (24 loc) · 746 Bytes
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os, sys
from django import conf
conf.settings = conf.global_settings
conf.settings.USE_I18N = False
conf.settings.SETTINGS_MODULE = 'django.conf.global_settings'
conf.settings.INSTALLED_APPS = [
'django_elliptics'
]
conf.settings.DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
}
env_elliptics_url = os.environ.get('ELLIPTICS_URL')
if env_elliptics_url:
conf.settings.ELLIPTICS_PUBLIC_URL = env_elliptics_url
conf.settings.ELLIPTICS_PRIVATE_URL = env_elliptics_url
from django.test import utils
def main():
runner_class = utils.get_runner(conf.settings)
runner = runner_class()
return runner.run_tests(['django_elliptics'])
if __name__ == '__main__':
sys.exit(main())