Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
chore: revert migration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
awais786 committed Sep 25, 2023
1 parent e4c7674 commit 66aeb2c
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions analytics_data_api/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 66aeb2c

Please sign in to comment.