diff --git a/.gitignore b/.gitignore index cf9bfc18..dc83a16a 100644 --- a/.gitignore +++ b/.gitignore @@ -38,7 +38,6 @@ htmlcov/ .tox/ .coverage .cache -nosetests.xml coverage.xml # Translations diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20ec9e74..5fe4470e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,6 +65,15 @@ test-3.9-core: reports: cobertura: coverage.xml +test-3.10-core: + image: python:3.10-bullseye + script: + - tox -e py310-core + artifacts: + when: always + reports: + cobertura: coverage.xml + test-3.7-all: image: python:3.7-bullseye script: @@ -92,9 +101,18 @@ test-3.9-all: reports: cobertura: coverage.xml +test-3.10-all: + image: python:3.10-bullseye + script: + - tox -e py310-all + artifacts: + when: always + reports: + cobertura: coverage.xml + deploy_production: stage: deploy - image: python:3.9-bullseye + image: python:3.10-bullseye before_script: - pip install twine wheel diff --git a/allianceauth/authentication/tests/test_admin.py b/allianceauth/authentication/tests/test_admin.py index 01455ddf..e48f3623 100644 --- a/allianceauth/authentication/tests/test_admin.py +++ b/allianceauth/authentication/tests/test_admin.py @@ -419,7 +419,7 @@ class TestUserAdmin(TestCaseWithTestData): # actions - @patch(MODULE_PATH + '.UserAdmin.message_user', auto_spec=True) + @patch(MODULE_PATH + '.UserAdmin.message_user', auto_spec=True, unsafe=True) @patch(MODULE_PATH + '.update_character') def test_action_update_main_character_model( self, mock_task, mock_message_user diff --git a/docs/requirements.txt b/docs/requirements.txt index cbbe8ebd..b187b2e6 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -13,4 +13,3 @@ celery>5,<6 celery_once passlib redis>=3.3.1,<4.0.0 -django-nose diff --git a/setup.py b/setup.py index 1e9632e5..17863292 100644 --- a/setup.py +++ b/setup.py @@ -39,7 +39,6 @@ install_requires = [ testing_extras = [ 'coverage>=4.3.1', 'requests-mock>=1.2.0', - 'django-nose', 'django-webtest', ] @@ -80,6 +79,7 @@ setup( 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', ], diff --git a/tests/settings_all.py b/tests/settings_all.py index f3d618c7..4e7b631d 100644 --- a/tests/settings_all.py +++ b/tests/settings_all.py @@ -6,15 +6,6 @@ Testing all services and plug-in apps from allianceauth.project_template.project_name.settings.base import * -# Use nose to run all tests -TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' - -NOSE_ARGS = [ - #'--with-coverage', - #'--cover-package=', - #'--exe', # If your tests need this to be found/run, check they py files are not chmodded +x -] - # Celery configuration CELERY_ALWAYS_EAGER = True # Forces celery to run locally for testing @@ -36,7 +27,6 @@ INSTALLED_APPS += [ 'allianceauth.services.modules.phpbb3', 'allianceauth.services.modules.xenforo', 'allianceauth.services.modules.teamspeak3', - 'django_nose', ] ROOT_URLCONF = 'tests.urls' diff --git a/tests/settings_core.py b/tests/settings_core.py index effc39da..fd97a388 100644 --- a/tests/settings_core.py +++ b/tests/settings_core.py @@ -6,21 +6,9 @@ Testing core packages only from allianceauth.project_template.project_name.settings.base import * -# Use nose to run all tests -TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' - -NOSE_ARGS = [ - #'--with-coverage', - #'--cover-package=', - #'--exe', # If your tests need this to be found/run, check they py files are not chmodded +x -] - # Celery configuration CELERY_ALWAYS_EAGER = True # Forces celery to run locally for testing -INSTALLED_APPS += [ - 'django_nose', -] ROOT_URLCONF = 'tests.urls' diff --git a/tox.ini b/tox.ini index a8603b58..2219c239 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] skipsdist = true usedevelop = true -envlist = py{37,38,39}-{all,core} +envlist = py{37,38,39,310}-{all,core} [testenv] setenv = @@ -11,11 +11,12 @@ basepython = py37: python3.7 py38: python3.8 py39: python3.9 + py310: python3.10 deps= coverage install_command = pip install -e ".[testing]" -U {opts} {packages} commands = - all: coverage run runtests.py -v 2 - core: coverage run runtests.py allianceauth.authentication.tests.test_app_settings -v 2 + all: coverage run runtests.py -v 2 --debug-mode + core: coverage run runtests.py allianceauth.authentication.tests.test_app_settings -v 2 --debug-mode all: coverage report -m all: coverage xml