diff --git a/news/244.tests b/news/244.tests new file mode 100644 index 0000000000..0ee4acc1f6 --- /dev/null +++ b/news/244.tests @@ -0,0 +1,2 @@ +Explicitly globally disable comments in the tests that need it. +[maurits] \ No newline at end of file diff --git a/src/plone/restapi/tests/test_dxcontent_serializer.py b/src/plone/restapi/tests/test_dxcontent_serializer.py index 789cf865fa..6fd514956f 100644 --- a/src/plone/restapi/tests/test_dxcontent_serializer.py +++ b/src/plone/restapi/tests/test_dxcontent_serializer.py @@ -527,6 +527,9 @@ def test_allow_discussion_by_default(self): self.assertEqual(False, obj["allow_discussion"]) def test_allow_discussion_obj_instance_allows_but_not_global_enabled(self): + registry = queryUtility(IRegistry) + settings = registry.forInterface(IDiscussionSettings, check=False) + settings.globally_enabled = False self.portal.invokeFactory("Document", id="doc2") self.portal.doc2.allow_discussion = True serializer = getMultiAdapter((self.portal.doc2, self.request), ISerializeToJson) @@ -536,6 +539,9 @@ def test_allow_discussion_obj_instance_allows_but_not_global_enabled(self): self.assertEqual(False, obj["allow_discussion"]) def test_allow_discussion_fti_allows_not_global_enabled(self): + registry = queryUtility(IRegistry) + settings = registry.forInterface(IDiscussionSettings, check=False) + settings.globally_enabled = False self.portal.invokeFactory("Document", id="doc2") portal_types = getToolByName(self.portal, "portal_types") document_fti = getattr(portal_types, self.portal.doc2.portal_type)