forked from bread-and-pepper/django-userena
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtests.py
More file actions
30 lines (25 loc) · 664 Bytes
/
tests.py
File metadata and controls
30 lines (25 loc) · 664 Bytes
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
"""
python setup.py test
"""
import os
import sys
os.environ["DJANGO_SETTINGS_MODULE"] = 'demo_project.settings'
from demo_project import settings
settings.INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.contenttypes',
'django.contrib.admin',
'django.contrib.sites',
'demo_project.profiles',
'guardian',
'userena',
'userena.contrib.umessages',
)
def main():
from django.test.utils import get_runner
test_runner = get_runner(settings)(interactive=False)
failures = test_runner.run_tests(['userena', 'umessages',])
sys.exit(failures)
if __name__ == '__main__':
main()