Skip to content

Commit

Permalink
Fix tests for newer versions of Django
Browse files Browse the repository at this point in the history
  • Loading branch information
danpalmer authored and lamby committed Jun 21, 2019
1 parent 9338b5b commit ba77822
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/tests_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import tempfile
import subprocess

from django import VERSION
from django.test import TestCase as DjangoTestCase


Expand Down Expand Up @@ -65,6 +66,10 @@ def test_stable_migrations(self):
self.assertMigrationExists('0001')

self.run_command('migrate')

if VERSION < (1, 10):
self.run_command('makemigrations tests --exit', expect_failure=True)
else:
self.run_command('makemigrations tests --check', expect_failure=True)

self.run_command('makemigrations tests --exit', expect_failure=True)
self.assertMigrationExists('0002', exists=False)

0 comments on commit ba77822

Please sign in to comment.