Skip to content

Commit

Permalink
Move django-admin check command to test suite
Browse files Browse the repository at this point in the history
Instead of running it as part of tox, this ensures it runs as an
explicit test in the integration test suite.
  • Loading branch information
lunkwill42 committed Nov 27, 2024
1 parent 7c55e5e commit 9168ad0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/integration/django_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django.core.management import call_command


def test_django_manage_check():
"""Runs Django's `check` management command to verify the Django project is
correctly configured.
"""
call_command('check')
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ commands_pre =
commands =
unit: pytest -o junit_suite_name="{envname} unit tests" --cov-config {toxinidir}/tests/.coveragerc --cov={toxinidir}/python --cov-report=xml:reports/{envname}/coverage.xml --junitxml=reports/{envname}/unit-results.xml --verbose {posargs:tests/unittests}

integration: python -m nav.django.manage check
{integration,functional}: nav config install {envdir}/etc
{integration,functional}: mkdir -p {envdir}/uploads
{integration,functional}: sed -i 's,^\#\?UPLOAD_DIR.*.,UPLOAD_DIR={envdir}/uploads,' {envdir}/etc/nav.conf
Expand Down

0 comments on commit 9168ad0

Please sign in to comment.