Skip to content

Commit

Permalink
skip tests that require DX site root in Plone 5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed Aug 26, 2024
1 parent 07a1454 commit b5f99dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plone/restapi/tests/test_dxcontent_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
import json
import unittest

HAS_PLONE_6 = getattr(
import_module("Products.CMFPlone.factory"), "PLONE60MARKER", False
)
HAS_PLONE_61 = getattr(
import_module("Products.CMFPlone.factory"), "PLONE61MARKER", False
)
Expand Down Expand Up @@ -362,6 +365,7 @@ def test_nextprev_root_no_nextprev(self):
self.assertEqual({}, data["previous_item"])
self.assertEqual({}, data["next_item"])

@unittest.skipUnless(HAS_PLONE_6, "Requires Dexterity-based site root")
def test_nextprev_root_has_prev(self):
fti = queryUtility(IDexterityFTI, name="Plone Site")
behavior_list = [a for a in fti.behaviors]
Expand Down Expand Up @@ -390,6 +394,7 @@ def test_nextprev_root_has_prev(self):
)
self.assertEqual({}, data["next_item"])

@unittest.skipUnless(HAS_PLONE_6, "Requires Dexterity-based site root")
def test_nextprev_root_has_next(self):
fti = queryUtility(IDexterityFTI, name="Plone Site")
behavior_list = [a for a in fti.behaviors]
Expand Down Expand Up @@ -418,6 +423,7 @@ def test_nextprev_root_has_next(self):
data["next_item"],
)

@unittest.skipUnless(HAS_PLONE_6, "Requires Dexterity-based site root")
def test_nextprev_root_has_nextprev(self):
fti = queryUtility(IDexterityFTI, name="Plone Site")
behavior_list = [a for a in fti.behaviors]
Expand Down

0 comments on commit b5f99dd

Please sign in to comment.