diff --git a/axes/test_settings.py b/axes/tests/settings.py similarity index 98% rename from axes/test_settings.py rename to axes/tests/settings.py index 770832a..825172b 100644 --- a/axes/test_settings.py +++ b/axes/tests/settings.py @@ -32,7 +32,7 @@ PASSWORD_HASHERS = [ 'django.contrib.auth.hashers.MD5PasswordHasher', ] -ROOT_URLCONF = 'axes.test_urls' +ROOT_URLCONF = 'axes.tests.urls' INSTALLED_APPS = [ 'django.contrib.auth', diff --git a/axes/test_urls.py b/axes/tests/urls.py similarity index 100% rename from axes/test_urls.py rename to axes/tests/urls.py diff --git a/manage.py b/manage.py index 9ce901e..abb00c0 100644 --- a/manage.py +++ b/manage.py @@ -4,7 +4,7 @@ import os import sys if __name__ == '__main__': - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'axes.test_settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'axes.tests.settings') from django.core.management import execute_from_command_line diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..bc623c1 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +DJANGO_SETTINGS_MODULE = axes.tests.settings +python_files = tests.py test_*.py tests_*.py *_tests.py *_test.py diff --git a/requirements.txt b/requirements.txt index ca39f4b..078bdac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,7 @@ coverage==4.5.2 mypy==0.670 prospector==1.1.6.2 +pytest==4.3.0 +pytest-django==3.4.7 sphinx_rtd_theme==0.4.3 tox==3.7.0 diff --git a/tox.ini b/tox.ini index 0149841..96a62df 100644 --- a/tox.ini +++ b/tox.ini @@ -27,7 +27,7 @@ usedevelop = True ignore_outcome = djangomaster: True commands = - coverage run -a manage.py test -v2 + coverage run -a -m pytest coverage report prospector mypy axes