tox.ini: add a nomigrations option

This commit is contained in:
Benjamin Dauvergne 2016-03-16 15:13:35 +01:00
parent a7f8b9ffbe
commit 47f6d108b0
2 changed files with 11 additions and 6 deletions

View File

@ -14,7 +14,9 @@ def empty_site():
for klass in [User, Variable] + AVAILABLE_SERVICES:
klass.objects.all().delete()
def test_empty_hobo(empty_site):
def test_empty_hobo(request, empty_site):
if request.config.getvalue('nomigrations'):
pytest.skip('skipping because of nomigrations')
hobo_json = get_hobo_json()
assert hobo_json['variables'] == {}
assert hobo_json['services'] == []
@ -40,7 +42,9 @@ def test_services(empty_site):
assert authentic_json['title'] == 'bar'
assert authentic_json['saml-idp-metadata-url']
def test_profile(empty_site):
def test_profile(request, empty_site):
if request.config.getvalue('nomigrations'):
pytest.skip('skipping because of nomigrations')
hobo_json = get_hobo_json()
assert hobo_json['profile']['fields'][0]['name'] == 'title'
assert hobo_json['profile']['fields'][0]['required'] is False

View File

@ -21,6 +21,7 @@ setenv =
passerelle: PASSERELLE_SETTINGS_FILE=tests_passerelle/settings.py
passerelle: DJANGO_SETTINGS_MODULE=passerelle.settings
coverage: COVERAGE=--junitxml=junit-{envname}.xml --cov-report xml --cov=hobo/ --cov-config .coveragerc
nomigrations: NOMIGRATIONS=--nomigrations
deps:
dj17: django>1.7,<1.8
dj18: django>1.8,<1.9
@ -43,8 +44,8 @@ deps:
http://git.entrouvert.org/debian/django-tenant-schemas.git/snapshot/django-tenant-schemas-master.tar.gz
commands =
./getlasso.sh
hobo: py.test {env:COVERAGE:} {posargs:tests/}
multitenant: py.test {env:COVERAGE:} {posargs:tests_multitenant/}
authentic: py.test {env:COVERAGE:} {posargs:tests_authentic/}
passerelle: py.test {env:COVERAGE:} {posargs:tests_passerelle/}
hobo: py.test {env:COVERAGE:} {env:NOMIGRATIONS:} {posargs:tests/}
multitenant: py.test {env:COVERAGE:} {env:NOMIGRATIONS:} {posargs:tests_multitenant/}
authentic: py.test {env:COVERAGE:} {env:NOMIGRATIONS:} {posargs:tests_authentic/}
passerelle: py.test {env:COVERAGE:} {env:NOMIGRATIONS:} {posargs:tests_passerelle/}
coverage: mv coverage.xml coverage-{envname}.xml