From 66aeb2c8de72e8d7286067074f68cab4e95745a3 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Mon, 25 Sep 2023 18:51:37 +0500 Subject: [PATCH] chore: revert migration tests. --- analytics_data_api/tests/test_utils.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/analytics_data_api/tests/test_utils.py b/analytics_data_api/tests/test_utils.py index d64af433..e21d2998 100644 --- a/analytics_data_api/tests/test_utils.py +++ b/analytics_data_api/tests/test_utils.py @@ -1,10 +1,8 @@ import datetime -from io import StringIO from django.contrib.auth.models import User from django.core.management import CommandError, call_command from django.test import TestCase -from django.test.utils import override_settings from django_dynamic_fixture import G from rest_framework.authtoken.models import Token @@ -123,30 +121,6 @@ def test_general_range(self): ]) -class MigrationTests(TestCase): - """ - Tests for migrations. - """ - - @override_settings(MIGRATION_MODULES={}) - def test_migrations_are_in_sync(self): - """ - Tests that the migration files are in sync with the models. - If this fails, you needs to run the Django command makemigrations. - - The test is set up to override MIGRATION_MODULES to ensure migrations are - enabled for purposes of this test regardless of the overall test settings. - - TODO: Find a general way of handling the case where if we're trying to - make a migrationless release that'll require a separate migration - release afterwards, this test doesn't fail. - """ - out = StringIO() - call_command("makemigrations", dry_run=True, verbosity=3, stdout=out) - output = out.getvalue() - assert 'No changes detected' in output - - def set_databases(cls): """ This is to be used as a class decorator to set the databases