From 422906023360a4d21d5fa7692e0cbc342328cd44 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Mon, 4 Jan 2021 18:11:16 +0100 Subject: [PATCH] Add pytest test to check for missing migrations --- articles/tests/conftest.py | 1 - articles/tests/test_migrations.py | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 articles/tests/test_migrations.py diff --git a/articles/tests/conftest.py b/articles/tests/conftest.py index ed261a9..a0348aa 100644 --- a/articles/tests/conftest.py +++ b/articles/tests/conftest.py @@ -1,7 +1,6 @@ import uuid import pytest -from django.core.management import call_command from django.utils import timezone from articles.models import Article, User diff --git a/articles/tests/test_migrations.py b/articles/tests/test_migrations.py new file mode 100644 index 0000000..907207b --- /dev/null +++ b/articles/tests/test_migrations.py @@ -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")