Skip to content

Commit

Permalink
Make test v3 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Nov 26, 2024
1 parent c96ff20 commit a6e09c4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from djangocms_text import html, settings
from djangocms_text.html import dynamic_href, dynamic_src, render_dynamic_attributes
from tests.fixtures import TestFixture
from tests.fixtures import DJANGO_CMS4, TestFixture


class HtmlSanitizerAdditionalProtocolsTests:
Expand Down Expand Up @@ -176,9 +176,12 @@ class DjangoCMSPictureIntegrationTestCase(CMSTestCase):
def setUp(self):
super().setUp()
self.home = self.create_homepage("home", "page.html", "en")
self.placeholder = (
self.home.pagecontent_set(manager="admin_manager").first().get_placeholders().get(slot="content")
)
if DJANGO_CMS4:
self.placeholder = (
self.home.pagecontent_set(manager="admin_manager").first().get_placeholders().get(slot="content")
)
else:
self.placeholder = self.home.get_placeholders("en").get(slot="content")

def test_extract_images(self):
with patch("tests.test_html.save_image") as mock_save_image:
Expand Down

0 comments on commit a6e09c4

Please sign in to comment.