diff --git a/tests/conftest.py b/tests/conftest.py index 114ce271f..22d3c5f34 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -27,7 +27,6 @@ from django.core.cache import cache from django.core.management import call_command from django.db import connection from django.db.migrations.executor import MigrationExecutor -from pytest_django.migrations import DisableMigrations from authentic2 import hooks as a2_hooks from authentic2.a2_rbac.utils import get_default_ou @@ -283,14 +282,6 @@ def concurrency(settings): return 100 -@pytest.fixture -def migrations(): - from django.conf import settings - - if isinstance(settings.MIGRATION_MODULES, DisableMigrations): - pytest.skip('this test requires native migrations') - - @pytest.fixture def oidc_client(db, ou1): client = OIDCClient.objects.create( diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py index 959583473..3f3ae270e 100644 --- a/tests/test_concurrency.py +++ b/tests/test_concurrency.py @@ -23,7 +23,9 @@ from authentic2.models import Attribute, AttributeValue @pytest.mark.slow -def test_attribute_value_uniqueness(migrations, transactional_db, simple_user, concurrency): +def test_attribute_value_uniqueness(transactional_db, simple_user, concurrency, pytestconfig): + if pytestconfig.getoption('nomigrations'): + pytest.skip('running migrations is required for this test') # disable default attributes Attribute.objects.update(disabled=True)