[Testbot] Plone 4.3 - Python 2.6 - Build # 2637 - Still failing! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Fri Jan 23 11:22:00 UTC 2015


-------------------------------------------------------------------------------
Plone 4.3 - Python 2.6 - Build # 2637 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-4.3-python-2.6/2637/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.dexterity
Branch: refs/heads/master
Date: 2015-01-23T11:44:35+01:00
Author: Timo Stollenwerk () <contact at timostollenwerk.net>
Commit: https://github.com/plone/plone.dexterity/commit/04013c60aeb7715704a0d3642e84b5be1b4db404

Mock Zope DateTime for test_content tests. There seems to be a test isolation problem that occurs only on Jenkins. See https://github.com/plone/Products.CMFPlone/issues/356 for details.

Files changed:
M plone/dexterity/tests/test_content.py

diff --git a/plone/dexterity/tests/test_content.py b/plone/dexterity/tests/test_content.py
index 7a9851f..7755aec 100644
--- a/plone/dexterity/tests/test_content.py
+++ b/plone/dexterity/tests/test_content.py
@@ -628,7 +628,16 @@ def test_name_unicode_id_str(self):
         self.assertTrue(isinstance(i.getId(), str))
 
     def test_item_dublincore(self):
-        from DateTime.DateTime import DateTime
+        from DateTime import DateTime
+        # Mock Zope DateTime
+        import mock
+        import plone.dexterity
+        datetime_patcher = mock.patch.object(
+            plone.dexterity.content, 'DateTime'
+        )
+        mocked_datetime = datetime_patcher.start()
+        mocked_datetime.return_value = DateTime(2013, 11, 7)
+        self.addCleanup(datetime_patcher.stop)
 
         i = Item(
             title=u"Emperor Penguin",
@@ -675,7 +684,16 @@ def test_item_dublincore(self):
         self.assertEqual(i.Identifier(), i.absolute_url())
 
     def test_item_dublincore_date(self):
-        from DateTime.DateTime import DateTime
+        from DateTime import DateTime
+        # Mock Zope DateTime
+        import mock
+        import plone.dexterity
+        datetime_patcher = mock.patch.object(
+            plone.dexterity.content, 'DateTime'
+        )
+        mocked_datetime = datetime_patcher.start()
+        mocked_datetime.return_value = DateTime(2013, 11, 7)
+        self.addCleanup(datetime_patcher.stop)
 
         i = Item(
             title=u"Emperor Penguin",
@@ -707,7 +725,16 @@ def test_item_dublincore_date(self):
         self.assertEqual(i.Date(), i.EffectiveDate())
 
     def test_item_dublincore_datetime(self):
-        from DateTime.DateTime import DateTime
+        from DateTime import DateTime
+        # Mock Zope DateTime
+        import mock
+        import plone.dexterity
+        datetime_patcher = mock.patch.object(
+            plone.dexterity.content, 'DateTime'
+        )
+        mocked_datetime = datetime_patcher.start()
+        mocked_datetime.return_value = DateTime(2013, 11, 7)
+        self.addCleanup(datetime_patcher.stop)
 
         i = Item(
             title=u"Emperor Penguin",




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 2660 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20150123/06add532/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 190894 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20150123/06add532/attachment-0003.obj>


More information about the Testbot mailing list