[Testbot] Plone 5.0 - Python 2.7 - Build # 3597 - Still failing! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Sun Nov 2 15:08:00 UTC 2014


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 3597 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/3597/


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

Repository: Products.CMFDiffTool
Branch: refs/heads/master
Date: 2014-11-02T15:11:00+01:00
Author: Simon Delcourt (sdelcourt) <delcourt.simon at gmail.com>
Commit: https://github.com/plone/Products.CMFDiffTool/commit/e76f962851487ea7c57948064f6ffa875c35365a

Handle case for dexterity behaviour empty field.

Files changed:
M Products/CMFDiffTool/BaseDiff.py
M Products/CMFDiffTool/dexteritydiff.py
M Products/CMFDiffTool/testing.py

diff --git a/Products/CMFDiffTool/BaseDiff.py b/Products/CMFDiffTool/BaseDiff.py
index 93a68bb..4fa93e5 100644
--- a/Products/CMFDiffTool/BaseDiff.py
+++ b/Products/CMFDiffTool/BaseDiff.py
@@ -72,10 +72,8 @@ def _getValue(ob, field, field_name, convert_to_str=True):
     # Check for the attribute without acquisition.  If it's there,
     # grab it *with* acquisition, so things like ComputedAttribute
     # will work
-    if field_name and hasattr(aq_base(ob), field_name):
-        value = getattr(ob, field_name)
-    elif IDexterityContent.providedBy(ob):
-        return field.default
+    if IDexterityContent.providedBy(ob) and field:
+        value = getattr(ob, field, None)
     elif field and hasattr(aq_base(ob), field):
         value = getattr(ob, field)
     elif hasattr(aq_base(ob), 'getField'):
diff --git a/Products/CMFDiffTool/dexteritydiff.py b/Products/CMFDiffTool/dexteritydiff.py
index b5d7270..dc0f212 100644
--- a/Products/CMFDiffTool/dexteritydiff.py
+++ b/Products/CMFDiffTool/dexteritydiff.py
@@ -119,7 +119,7 @@ def _diff_field(self, obj1, obj2, field, schema_name):
         return diff_type(
             obj1,
             obj2,
-            field,
+            field.getName(),
             id1=self.id1,
             id2=self.id2,
             field_name=field.getName(),
diff --git a/Products/CMFDiffTool/testing.py b/Products/CMFDiffTool/testing.py
index f6316bb..7ca230a 100644
--- a/Products/CMFDiffTool/testing.py
+++ b/Products/CMFDiffTool/testing.py
@@ -8,8 +8,6 @@
 from plone.app.testing.bbb import PTC_FIXTURE
 from plone.app.testing import PloneSandboxLayer
 from plone.app.testing import FunctionalTesting
-from plone.app.testing import applyProfile
-from plone.testing import z2
 
 TEST_CONTENT_TYPE_ID = 'TestContentType'
 
@@ -52,6 +50,7 @@ def setUpPloneSite(self, portal):
                 'plone.app.versioningbehavior.behaviors.IVersionable',
                 'plone.app.dexterity.behaviors.metadata.IBasic',
                 'plone.app.dexterity.behaviors.metadata.IRelatedItems',
+                'plone.app.contenttypes.behaviors.collection.ICollection',
             ),
             model_source='''
             <model xmlns="http://namespaces.plone.org/supermodel/schema">


Repository: Products.CMFDiffTool
Branch: refs/heads/master
Date: 2014-11-02T15:22:38+01:00
Author: Simon Delcourt (sdelcourt) <delcourt.simon at gmail.com>
Commit: https://github.com/plone/Products.CMFDiffTool/commit/81aac20bc7ca482732199fe08989b7b313b92754

Changelog.

Files changed:
M CHANGES.txt

diff --git a/CHANGES.txt b/CHANGES.txt
index aa263fd..d72a620 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,8 @@ Changelog
 
 - Ported tests to plone.app.testing
   [tomgross]
+- Fix _getValue() bug for dexterity behaviour empty fields.
+  [sdelcourt] 
 
 
 2.1 (2013-05-26)


Repository: Products.CMFDiffTool
Branch: refs/heads/master
Date: 2014-11-02T14:31:24Z
Author: Philip Bauer (pbauer) <bauer at starzel.de>
Commit: https://github.com/plone/Products.CMFDiffTool/commit/83b9f6aafefedef4951b69a8161d60d165cd55ef

Merge pull request #3 from plone/dexterity_behaviour_bug

Dexterity behaviour bug

Files changed:
M CHANGES.txt
M Products/CMFDiffTool/BaseDiff.py
M Products/CMFDiffTool/dexteritydiff.py
M Products/CMFDiffTool/testing.py

diff --git a/CHANGES.txt b/CHANGES.txt
index aa263fd..d72a620 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,8 @@ Changelog
 
 - Ported tests to plone.app.testing
   [tomgross]
+- Fix _getValue() bug for dexterity behaviour empty fields.
+  [sdelcourt] 
 
 
 2.1 (2013-05-26)
diff --git a/Products/CMFDiffTool/BaseDiff.py b/Products/CMFDiffTool/BaseDiff.py
index 93a68bb..4fa93e5 100644
--- a/Products/CMFDiffTool/BaseDiff.py
+++ b/Products/CMFDiffTool/BaseDiff.py
@@ -72,10 +72,8 @@ def _getValue(ob, field, field_name, convert_to_str=True):
     # Check for the attribute without acquisition.  If it's there,
     # grab it *with* acquisition, so things like ComputedAttribute
     # will work
-    if field_name and hasattr(aq_base(ob), field_name):
-        value = getattr(ob, field_name)
-    elif IDexterityContent.providedBy(ob):
-        return field.default
+    if IDexterityContent.providedBy(ob) and field:
+        value = getattr(ob, field, None)
     elif field and hasattr(aq_base(ob), field):
         value = getattr(ob, field)
     elif hasattr(aq_base(ob), 'getField'):
diff --git a/Products/CMFDiffTool/dexteritydiff.py b/Products/CMFDiffTool/dexteritydiff.py
index b5d7270..dc0f212 100644
--- a/Products/CMFDiffTool/dexteritydiff.py
+++ b/Products/CMFDiffTool/dexteritydiff.py
@@ -119,7 +119,7 @@ def _diff_field(self, obj1, obj2, field, schema_name):
         return diff_type(
             obj1,
             obj2,
-            field,
+            field.getName(),
             id1=self.id1,
             id2=self.id2,
             field_name=field.getName(),
diff --git a/Products/CMFDiffTool/testing.py b/Products/CMFDiffTool/testing.py
index f6316bb..7ca230a 100644
--- a/Products/CMFDiffTool/testing.py
+++ b/Products/CMFDiffTool/testing.py
@@ -8,8 +8,6 @@
 from plone.app.testing.bbb import PTC_FIXTURE
 from plone.app.testing import PloneSandboxLayer
 from plone.app.testing import FunctionalTesting
-from plone.app.testing import applyProfile
-from plone.testing import z2
 
 TEST_CONTENT_TYPE_ID = 'TestContentType'
 
@@ -52,6 +50,7 @@ def setUpPloneSite(self, portal):
                 'plone.app.versioningbehavior.behaviors.IVersionable',
                 'plone.app.dexterity.behaviors.metadata.IBasic',
                 'plone.app.dexterity.behaviors.metadata.IRelatedItems',
+                'plone.app.contenttypes.behaviors.collection.ICollection',
             ),
             model_source='''
             <model xmlns="http://namespaces.plone.org/supermodel/schema">




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


More information about the Testbot mailing list