mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-03-16 22:20:27 +00:00
Get rid of manage.py for running tests now that we have django-cadmin.
Closes #92.
This commit is contained in:
parent
cc869bf577
commit
6f6930495c
4 changed files with 6 additions and 16 deletions
|
|
@ -1,7 +1,6 @@
|
|||
include README.rst
|
||||
include AUTHORS
|
||||
include .travis.yml
|
||||
include manage.py
|
||||
include tasks.py
|
||||
recursive-include tests *
|
||||
recursive-include docs *
|
||||
|
|
|
|||
11
manage.py
11
manage.py
|
|
@ -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)
|
||||
|
|
@ -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'))
|
||||
|
|
|
|||
5
tox.ini
5
tox.ini
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue