Skip to content

Commit

Permalink
[fc] Repository: Products.CMFPlone
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2017-01-14T20:18:38+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Products.CMFPlone@e325c93

Fixed tests with newer plone.app.discussion.

Files changed:
M CHANGES.rst
M Products/CMFPlone/tests/testPortalCreation.py
M Products/CMFPlone/tests/testWorkflowTool.py
Repository: Products.CMFPlone
Branch: refs/heads/master
Date: 2017-01-16T16:40:03+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Products.CMFPlone@774dc30

Merge pull request #1909 from plone/comment-one-state-workflow-51

Fixed tests with newer plone.app.discussion. [5.1]

Files changed:
M CHANGES.rst
M Products/CMFPlone/tests/testPortalCreation.py
M Products/CMFPlone/tests/testWorkflowTool.py
  • Loading branch information
mauritsvanrees committed Jan 16, 2017
1 parent 7730607 commit ee02908
Showing 1 changed file with 97 additions and 63 deletions.
160 changes: 97 additions & 63 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,86 +1,120 @@
Repository: plone.app.querystring
Repository: Products.CMFPlone


Branch: refs/heads/master
Date: 2017-01-16T15:59:40+01:00
Author: Vincent Fretin (vincentfretin) <vincent.fretin@gmail.com>
Commit: https://github.com/plone/plone.app.querystring/commit/d431848fa4ef8342e37757e923c1004e4f867f30
Date: 2017-01-14T20:18:38+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/Products.CMFPlone/commit/e325c93093e67449c28c16f1ca3c0bfd0bac7ded

Import DateTimeError from DateTime.interfaces, class attribute DateTime.DateTimeError was removed in DateTime 3.0
Fixed tests with newer plone.app.discussion.

Files changed:
M CHANGES.rst
M plone/app/querystring/queryparser.py
M Products/CMFPlone/tests/testPortalCreation.py
M Products/CMFPlone/tests/testWorkflowTool.py

diff --git a/CHANGES.rst b/CHANGES.rst
index 40e82b7..4b9a705 100644
index 811b256..449e28e 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -4,19 +4,15 @@ Changelog
1.4.2 (unreleased)
------------------
@@ -139,6 +139,8 @@ New features:

-Breaking changes:
-
-- *add item here*
-
-New features:
-
-- *add item here*
-
Bug fixes:

- Fix a case, where index modifiers with queries containing ``largerThanRelativeDate`` or ``lessThanRelativeDate`` date operators failed with an ``TypeError``.
[thet]

+- Import DateTimeError from DateTime.interfaces, class attribute
+ DateTime.DateTimeError was removed in DateTime 3.0
+ [vincentfretin]
+- Fixed workflow tests for new ``comment_one_state_workflow``. [maurits]
+
- Fixed sometimes failing search order tests. [maurits]

- Load some Products.CMFPlone.patches earlier, instead of in our initialize method.
diff --git a/Products/CMFPlone/tests/testPortalCreation.py b/Products/CMFPlone/tests/testPortalCreation.py
index f493c2e..ea3b84c 100644
--- a/Products/CMFPlone/tests/testPortalCreation.py
+++ b/Products/CMFPlone/tests/testPortalCreation.py
@@ -622,10 +622,10 @@ def testMemberHasViewGroupsPermission(self):
self.assertTrue(member_has_permission['selected'])

def testDiscussionItemWorkflow(self):
- # By default the discussion item has the one_state_workflow
+ # By default the discussion item has the comment_one_state_workflow
self.assertEqual(
self.workflow.getChainForPortalType('Discussion Item'),
- ('one_state_workflow',))
+ ('comment_one_state_workflow',))

1.4.1 (2016-11-18)
------------------
@@ -26,6 +22,7 @@ Bug fixes:
- Add coding header on python files.
[gforcada]
def testFolderHasFolderListingView(self):
# Folder type should allow 'folder_listing'
diff --git a/Products/CMFPlone/tests/testWorkflowTool.py b/Products/CMFPlone/tests/testWorkflowTool.py
index 1fdc3cc..64df3c1 100644
--- a/Products/CMFPlone/tests/testWorkflowTool.py
+++ b/Products/CMFPlone/tests/testWorkflowTool.py
@@ -26,6 +26,7 @@ class IDocument(Interface):
'one_state_workflow': ('published',),
'plone_workflow': ('pending', 'private', 'published', 'visible',),
'simple_publication_workflow': ('private', 'published', 'pending',),
+ 'comment_one_state_workflow': ('published',),
'comment_review_workflow': ('pending', 'published',)
}
# then we join all states into one master list


Repository: Products.CMFPlone


Branch: refs/heads/master
Date: 2017-01-16T16:40:03+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/Products.CMFPlone/commit/774dc305a764e7e6fb9f7a398876e15b74903fd9

Merge pull request #1909 from plone/comment-one-state-workflow-51

Fixed tests with newer plone.app.discussion. [5.1]

Files changed:
M CHANGES.rst
M Products/CMFPlone/tests/testPortalCreation.py
M Products/CMFPlone/tests/testWorkflowTool.py

diff --git a/CHANGES.rst b/CHANGES.rst
index 811b256..449e28e 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -139,6 +139,8 @@ New features:

Bug fixes:

+- Fixed workflow tests for new ``comment_one_state_workflow``. [maurits]
+
1.4 (2016-08-18)
----------------
- Fixed sometimes failing search order tests. [maurits]

@@ -91,7 +88,6 @@ Fixes:
the Collection behavior.
[thet]
- Load some Products.CMFPlone.patches earlier, instead of in our initialize method.
diff --git a/Products/CMFPlone/tests/testPortalCreation.py b/Products/CMFPlone/tests/testPortalCreation.py
index f493c2e..ea3b84c 100644
--- a/Products/CMFPlone/tests/testPortalCreation.py
+++ b/Products/CMFPlone/tests/testPortalCreation.py
@@ -622,10 +622,10 @@ def testMemberHasViewGroupsPermission(self):
self.assertTrue(member_has_permission['selected'])

-
1.3.11 (2015-10-30)
-------------------
def testDiscussionItemWorkflow(self):
- # By default the discussion item has the one_state_workflow
+ # By default the discussion item has the comment_one_state_workflow
self.assertEqual(
self.workflow.getChainForPortalType('Discussion Item'),
- ('one_state_workflow',))
+ ('comment_one_state_workflow',))

diff --git a/plone/app/querystring/queryparser.py b/plone/app/querystring/queryparser.py
index 4a12c6d..d1f4f18 100644
--- a/plone/app/querystring/queryparser.py
+++ b/plone/app/querystring/queryparser.py
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
from Acquisition import aq_parent
from collections import namedtuple
+from DateTime.interfaces import DateTimeError
from DateTime import DateTime
from plone.app.layout.navigation.root import getNavigationRoot
from plone.registry.interfaces import IRegistry
@@ -210,11 +211,11 @@ def _moreThanRelativeDate(context, row):
def _betweenDates(context, row):
try:
start_date = DateTime(row.values[0])
- except DateTime.DateTimeError:
+ except DateTimeError:
start_date = DateTime(0)
try:
end_date = DateTime(row.values[1])
- except DateTime.DateTimeError:
+ except DateTimeError:
row = Row(index=row.index,
operator=row.operator,
values=start_date)
def testFolderHasFolderListingView(self):
# Folder type should allow 'folder_listing'
diff --git a/Products/CMFPlone/tests/testWorkflowTool.py b/Products/CMFPlone/tests/testWorkflowTool.py
index 1fdc3cc..64df3c1 100644
--- a/Products/CMFPlone/tests/testWorkflowTool.py
+++ b/Products/CMFPlone/tests/testWorkflowTool.py
@@ -26,6 +26,7 @@ class IDocument(Interface):
'one_state_workflow': ('published',),
'plone_workflow': ('pending', 'private', 'published', 'visible',),
'simple_publication_workflow': ('private', 'published', 'pending',),
+ 'comment_one_state_workflow': ('published',),
'comment_review_workflow': ('pending', 'published',)
}
# then we join all states into one master list


0 comments on commit ee02908

Please sign in to comment.