forked from CGM_Public/pretix_original
Add test for no pending migrations
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user