1+ from unittest import skipIf
2+
13from cms .toolbar .utils import get_object_edit_url
24from cms .utils import get_current_site
35from cms .wizards .forms import WizardStep2BaseForm , step2_form_factory
46from cms .wizards .helpers import get_entries as get_wizard_entires
57from django .contrib .sites .models import Site
68from django .utils import translation
79
10+ from djangocms_alias .cms_config import AliasCMSConfig
11+ from djangocms_alias .cms_wizards import create_alias_category_wizard
812from djangocms_alias .models import Category
913from djangocms_alias .utils import is_versioning_enabled
1014
1115from .base import BaseAliasPluginTestCase
1216
17+ wizards = AliasCMSConfig .cms_wizards
18+
1319
1420class WizardsTestCase (BaseAliasPluginTestCase ):
1521 def _get_wizard_instance (self , wizard_name ):
@@ -103,6 +109,7 @@ def test_create_alias_wizard_form_with_no_category_fallback_language(self):
103109
104110 self .assertTrue (category_name )
105111
112+ @skipIf (create_alias_category_wizard not in wizards , "CreateAliasCategoryWizard is not registered" )
106113 def test_create_alias_category_wizard_instance (self ):
107114 wizard = self ._get_wizard_instance ("CreateAliasCategoryWizard" )
108115 self .assertEqual (wizard .title , "New alias category" )
@@ -118,6 +125,7 @@ def test_create_alias_category_wizard_instance(self):
118125 wizard .user_has_add_permission (self .get_standard_user ()),
119126 )
120127
128+ @skipIf (create_alias_category_wizard not in wizards , "CreateAliasCategoryWizard is not registered" )
121129 def test_create_alias_category_wizard_form (self ):
122130 wizard = self ._get_wizard_instance ("CreateAliasCategoryWizard" )
123131 data = {
0 commit comments