Skip to content

Commit

Permalink
Update migration test for v3
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Oct 27, 2024
1 parent a534cb5 commit e5794b0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_migrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@
from unittest import skipIf

from django.core.management import call_command
from django.forms import model_to_dict
from django.test import TestCase, override_settings

from cms import __version__ as cms_version
from cms.api import create_page
from cms.models import PageUrl

from django_test_migrations.contrib.unittest_case import MigratorTestCase

from djangocms_link import __version__
from djangocms_link.helpers import get_link
from tests.helpers import get_filer_file


class MigrationTestCase(TestCase):
Expand All @@ -40,7 +36,10 @@ def test_for_missing_migrations(self):
if status_code == '1' and "djangocms_link" in output:
self.fail(f'There are missing migrations:\n {output.getvalue()}')

@skipIf(__version__ >= '5' or cms_version < "4", "Migration has already been tested before releasing version 5")
@skipIf(
__version__ >= '5' or cms_version < "4",
"Migration has already been tested before releasing version 5",
)
class MigrationToVersion5(MigratorTestCase):
migrate_from = ('djangocms_link', '0016_alter_link_cmsplugin_ptr')
migrate_to = ('djangocms_link', '0018_remove_link_anchor_remove_link_external_link_and_more')
Expand Down

0 comments on commit e5794b0

Please sign in to comment.