tests: don't run migration tests with sqlite and newer django (#36331)

This commit is contained in:
Frédéric Péters 2019-09-21 21:20:08 +02:00
parent 95c09426c9
commit 5bc475c663
1 changed files with 7 additions and 0 deletions

View File

@ -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')]