From 3cefd2b7b368cfbfd5ca5b68aac3e794d98276a3 Mon Sep 17 00:00:00 2001 From: Alex Morega Date: Wed, 13 Dec 2023 14:24:47 +0200 Subject: [PATCH 1/2] 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()) From 73f6bfa57037b4b35fdbbccaec84c2bdbe07e42d Mon Sep 17 00:00:00 2001 From: Alex Morega Date: Thu, 14 Dec 2023 15:33:13 +0200 Subject: [PATCH 2/2] Fix class name --- wagtail_ab_testing/test/tests/test_migrations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wagtail_ab_testing/test/tests/test_migrations.py b/wagtail_ab_testing/test/tests/test_migrations.py index 7ce672b..1b9951a 100644 --- a/wagtail_ab_testing/test/tests/test_migrations.py +++ b/wagtail_ab_testing/test/tests/test_migrations.py @@ -3,7 +3,7 @@ from django.test import TestCase -class TestReportView(TestCase): +class TestMigrations(TestCase): def test_migrations(self): output = StringIO()