From 5f3698f78fbfda02b4568351edb657646c835d78 Mon Sep 17 00:00:00 2001 From: Katja Suess Date: Tue, 4 Feb 2020 12:39:28 +0100 Subject: [PATCH] plone.app.discussion extends the review workflow for moderation of comments. This change takes the additional workflow states into account. --- Products/CMFPlone/tests/testWorkflowTool.py | 6 +++--- news/3000.bugfix | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 news/3000.bugfix diff --git a/Products/CMFPlone/tests/testWorkflowTool.py b/Products/CMFPlone/tests/testWorkflowTool.py index 64df3c1ef5..36e6135c1c 100644 --- a/Products/CMFPlone/tests/testWorkflowTool.py +++ b/Products/CMFPlone/tests/testWorkflowTool.py @@ -112,7 +112,7 @@ def testGetTitleForTransitionOnTypeSucceedsWithNonString(self): def testListWFStatesByTitle(self): states = self.workflow.listWFStatesByTitle() - self.assertEqual(len(states), len(all_states)) + self.assertGreaterEqual(len(states), len(all_states)) pub_states = [s for s in states if s[1] == 'published'] priv_states = [s for s in states if s[1] == 'private'] pend_states = [s for s in states if s[1] == 'pending'] @@ -122,9 +122,9 @@ def testListWFStatesByTitle(self): internal_pub_states = [s for s in states if s[1] == 'internally_published'] - self.assertEqual(len(pub_states), all_states.count('published')) + self.assertGreaterEqual(len(pub_states), all_states.count('published')) self.assertEqual(len(priv_states), all_states.count('private')) - self.assertEqual(len(pend_states), all_states.count('pending')) + self.assertGreaterEqual(len(pend_states), all_states.count('pending')) self.assertEqual(len(vis_states), all_states.count('visible')) self.assertEqual(len(external_states), all_states.count('external')) self.assertEqual(len(internal_states), all_states.count('internal')) diff --git a/news/3000.bugfix b/news/3000.bugfix new file mode 100644 index 0000000000..0f6c31bd59 --- /dev/null +++ b/news/3000.bugfix @@ -0,0 +1,2 @@ +plone.app.discussion extends the review workflow for moderation of comments. This change takes the additional workflow states into account. +[ksuess]