Get rid of manage.py for running tests now that we have django-cadmin.

Closes #92.
This commit is contained in:
Jannis Leidel 2015-03-16 15:13:31 +01:00
parent cc869bf577
commit 6f6930495c
4 changed files with 6 additions and 16 deletions

View file

@ -1,7 +1,6 @@
include README.rst
include AUTHORS
include .travis.yml
include manage.py
include tasks.py
recursive-include tests *
recursive-include docs *

View file

@ -1,11 +0,0 @@
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tests.settings.main')
os.environ.setdefault('DJANGO_CONFIGURATION', 'Test')
from configurations.management import execute_from_command_line
execute_from_command_line(sys.argv)

View file

@ -102,10 +102,9 @@ class MainTests(TestCase):
Verify that's configuration option has been added to managements
commands
"""
manage_args = ['python', os.path.join(ROOT_DIR, 'manage.py')]
proc = subprocess.Popen(manage_args + ['test', '--help'],
proc = subprocess.Popen(['django-cadmin', 'test', '--help'],
stdout=subprocess.PIPE)
self.assertIn('--configuration', proc.communicate()[0].decode('utf-8'))
proc = subprocess.Popen(manage_args + ['runserver', '--help'],
proc = subprocess.Popen(['django-cadmin', 'runserver', '--help'],
stdout=subprocess.PIPE)
self.assertIn('--configuration', proc.communicate()[0].decode('utf-8'))

View file

@ -18,6 +18,9 @@ basepython =
py34: python3.4
pypy: pypy
usedevelop = true
setenv =
DJANGO_SETTINGS_MODULE = tests.settings.main
DJANGO_CONFIGURATION = Test
deps =
coverage
django-discover-runner
@ -35,7 +38,7 @@ deps =
dj19: https://github.com/django/django/archive/master.zip#egg=django
commands =
coverage run manage.py test -v2 {posargs:tests}
coverage run {envbindir}/django-cadmin test -v2 {posargs:tests}
coverage report
[testenv:flake8-py27]