Add pytest test to check for missing migrations
This commit is contained in:
parent
2267a61d77
commit
4229060233
2 changed files with 7 additions and 1 deletions
|
@ -1,7 +1,6 @@
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from django.core.management import call_command
|
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
from articles.models import Article, User
|
from articles.models import Article, User
|
||||||
|
|
7
articles/tests/test_migrations.py
Normal file
7
articles/tests/test_migrations.py
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
import pytest
|
||||||
|
from django.core.management import call_command
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.django_db
|
||||||
|
def test_missing_migrations():
|
||||||
|
call_command("makemigrations", "--check")
|
Reference in a new issue