Fix bug in {% autopaginate ... as ... %} handling.
[django-pagination.git] / tests / runtests.py
1 import sys
2 sys.path.append('..')
3
4 import os
5 # Make a backup of DJANGO_SETTINGS_MODULE environment variable to restore later.
6 backup = os.environ.get('DJANGO_SETTINGS_MODULE', '')
7 os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
8
9 from django.test.simple import run_tests
10
11 if __name__ == "__main__":
12     failures = run_tests(['linaro_django_pagination',], verbosity=9)
13     if failures:
14         sys.exit(failures)
15     # Reset the DJANGO_SETTINGS_MODULE to what it was before running tests.
16     os.environ['DJANGO_SETTINGS_MODULE'] = backup