Skip to content

Commit

Permalink
Fix test for Plone 5
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Jan 18, 2022
1 parent 30c8acf commit 0b82a08
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/plone/volto/tests/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@

import unittest

try:
from Products.CMFPlone.factory import PLONE60MARKER

PLONE60MARKER # pyflakes
except ImportError:
PLONE_6 = False
else:
PLONE_6 = True


class TestSetup(unittest.TestCase):
"""Test that plone.volto is properly installed."""
Expand Down Expand Up @@ -40,6 +49,10 @@ def test_browserlayer(self):

self.assertIn(IPloneVoltoCoreLayer, utils.registered_layers())

@unittest.skipIf(
not PLONE_6,
"This test is only intended to run for Plone 6",
)
def test_plone_site_has_blocks_behavior(self):
pt = api.portal.get_tool("portal_types")
fti = pt.getTypeInfo("Plone Site")
Expand Down

0 comments on commit 0b82a08

Please sign in to comment.