Skip to content

Commit

Permalink
Also run tests for cms 4.0 (non-community version)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Dec 15, 2022
1 parent 8926e70 commit 5a10d43
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,10 @@ def test_only_inline_editing_has_rendered_plugin_content(self):

self.add_plugin_to_text(text_plugin, self._add_child_plugin(text_plugin))
if DJANGO_CMS4:
from cms.models.contentmodels import PageContent
try:
from cms.models.contentmodels import PageContent
except ModuleNotFoundError:
from cms.models.titlemodels import PageContent
from cms.toolbar.utils import get_object_edit_url

if DJANGOCMS_VERSIONING:
Expand All @@ -520,7 +523,10 @@ def test_only_inline_editing_has_rendered_plugin_content(self):
).first()
)
else:
edit_endpoint = get_object_edit_url(simple_page.get_content_obj(language='en'))
try:
edit_endpoint = get_object_edit_url(simple_page.get_content_obj(language='en'))
except AttributeError:
edit_endpoint = get_object_edit_url(simple_page.get_title_obj(language='en'))
else:
edit_endpoint = simple_page.get_absolute_url()
with self.login_user_context(self.get_superuser()):
Expand Down

0 comments on commit 5a10d43

Please sign in to comment.