Permalink
Browse files

Fix tests: remove tests.py, use demo project manage.py to run tests

  • Loading branch information...
1 parent c5328fc commit 350712c6f6d13890731a76a81a42efd1cdd100c4 @yakky yakky committed Jan 3, 2013
Showing with 3 additions and 33 deletions.
  1. +3 −3 run_tests
  2. +0 −30 tests.py
View
@@ -4,15 +4,15 @@
case $1 in
userena ) echo -e "\033[1mRunning tests for userena.\033[0m"
- cmd="coverage run setup.py test"
+ cmd="coverage run demo/manage.py test userena"
report_cmd="coverage report -m userena/*.py userena/management/commands/*.py"
;;
umessages ) echo -e "\033[1mRunning tests for umessages.\033[0m"
- cmd="coverage run setup.py test"
+ cmd="coverage run demo/manage.py test umessages"
report_cmd="coverage report -m userena/contrib/umessages/*.py"
;;
* ) echo -e "\033[1mRunning all tests.\033[0m"
- cmd="coverage run setup.py test"
+ cmd="coverage run demo/manage.py test userena umessages"
report_cmd="coverage report -m userena/*.py userena/management/commands/*py userena/contrib/umessages/*.py"
esac
View
@@ -1,30 +0,0 @@
-"""
-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()

0 comments on commit 350712c

Please sign in to comment.