diff --git a/tests/test_data_migrations.py b/tests/test_data_migrations.py index 3ae9dc39..16244ea4 100644 --- a/tests/test_data_migrations.py +++ b/tests/test_data_migrations.py @@ -1,6 +1,7 @@ import datetime import pytest +import django from django.db import connection from django.db.migrations.executor import MigrationExecutor from django.utils.timezone import make_aware @@ -11,6 +12,9 @@ pytestmark = pytest.mark.django_db def test_meeting_type_slug_migration(): + if connection.vendor == 'sqlite' and django.VERSION > (1, 11, 0): + pytest.skip('SQLite schema editor cannot be used while foreign key constraint checks are enabled.') + return executor = MigrationExecutor(connection) migrate_from = [('agendas', '0011_meetingtype_slug')] migrate_to = [('agendas', '0013_auto_20161028_1603')] @@ -33,6 +37,9 @@ def test_meeting_type_slug_migration(): def test_timeperiod_data_migrations(): + if connection.vendor == 'sqlite' and django.VERSION > (1, 11, 0): + pytest.skip('SQLite schema editor cannot be used while foreign key constraint checks are enabled.') + return executor = MigrationExecutor(connection) app = 'agendas' migrate_from = [(app, '0016_desk')]