Compare commits

...

1 Commits

Author SHA1 Message Date
Raphael Michel
d9f0163329 Add test for no pending migrations 2024-07-01 11:27:13 +02:00

View File

@@ -0,0 +1,18 @@
from io import StringIO
import pytest
from django.core.management import call_command
@pytest.mark.django_db
def test_no_pending_migrations():
out = StringIO()
try:
call_command(
"makemigrations",
"--check",
stdout=out,
stderr=StringIO(),
)
except SystemExit: # pragma: no cover
raise AssertionError("Pending migrations:\n" + out.getvalue()) from None