From e6962bce0231df6561becc3a9d7ec168f5537a27 Mon Sep 17 00:00:00 2001 From: Alex Morega Date: Wed, 13 Dec 2023 14:24:47 +0200 Subject: [PATCH] Test for missing migrations --- .../test/tests/test_migrations.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 wagtail_ab_testing/test/tests/test_migrations.py diff --git a/wagtail_ab_testing/test/tests/test_migrations.py b/wagtail_ab_testing/test/tests/test_migrations.py new file mode 100644 index 0000000..7ce672b --- /dev/null +++ b/wagtail_ab_testing/test/tests/test_migrations.py @@ -0,0 +1,19 @@ +from io import StringIO +from django.core import management +from django.test import TestCase + + +class TestReportView(TestCase): + def test_migrations(self): + output = StringIO() + + try: + management.call_command( + "makemigrations", + "wagtail_ab_testing", + "--check", + stdout=output, + ) + + except SystemExit: + self.fail(output.getvalue())