Skip to content

Commit

Permalink
[fc] Repository: Products.Archetypes
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2016-10-18T12:21:37-04:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/Products.Archetypes@ebe0fc8

more flexible test on getBestIcon

Files changed:
M CHANGES.rst
M Products/Archetypes/tests/test_widgets.py
Repository: Products.Archetypes
Branch: refs/heads/master
Date: 2016-10-18T13:42:37-04:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/Products.Archetypes@37ba04b

Merge pull request #66 from plone/more-flexible-icon-test

more flexible test on getBestIcon

Files changed:
M CHANGES.rst
M Products/Archetypes/tests/test_widgets.py
  • Loading branch information
jensens committed Oct 18, 2016
1 parent dade284 commit f430ad1
Showing 1 changed file with 79 additions and 37 deletions.
116 changes: 79 additions & 37 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,46 +1,88 @@
Repository: plone.portlet.static
Repository: Products.Archetypes


Branch: refs/heads/master
Date: 2016-10-18T00:41:29-04:00
Author: Gil Forcada Codinachs (gforcada) <gil.gnome@gmail.com>
Commit: https://github.com/plone/plone.portlet.static/commit/1d385c2e67d06d9260f881229f8dd6ceb990dc62
Date: 2016-10-18T12:21:37-04:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/Products.Archetypes/commit/ebe0fc87a921b7a55fe78985a7d59320d265bee8

Remove outdated references to zope.formlib
more flexible test on getBestIcon

Files changed:
M CHANGES.rst
M Products/Archetypes/tests/test_widgets.py

diff --git a/CHANGES.rst b/CHANGES.rst
index e007568..0b26e5b 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -14,7 +14,8 @@ New features:

Bug fixes:

-- *add item here*
+- More flexible test of getBestIcon.
+ [jensens]


1.11.3 (2016-10-03)
diff --git a/Products/Archetypes/tests/test_widgets.py b/Products/Archetypes/tests/test_widgets.py
index e3efc21..7058dae 100644
--- a/Products/Archetypes/tests/test_widgets.py
+++ b/Products/Archetypes/tests/test_widgets.py
@@ -305,7 +305,7 @@ def test_rich_text_widget(self):

def test_getBestIcon(self):
doc = makeContent(self.folder, 'SimpleType', id='doc')
- self.assertEqual(doc.getBestIcon(), 'txt.png')
+ self.assertTrue(doc.getBestIcon().endswith('txt.png'))

def test_vocabulary_enforced(self):
doc = makeContent(self.folder, portal_type='ComplexType', id='demodoc')


Repository: Products.Archetypes

Since 2014 it is using z3c.form

https://github.com/plone/plone.portlet.static/commit/ee16d28f0fe5b7ec7a082a5bee0af942a724d0c5

Branch: refs/heads/master
Date: 2016-10-18T13:42:37-04:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/Products.Archetypes/commit/37ba04be133c2276f53f5af4a2e44efc410cbe60

Merge pull request #66 from plone/more-flexible-icon-test

more flexible test on getBestIcon

Files changed:
M plone/portlet/static/static.py

diff --git a/plone/portlet/static/static.py b/plone/portlet/static/static.py
index 0819c8b..7d47676 100644
--- a/plone/portlet/static/static.py
+++ b/plone/portlet/static/static.py
@@ -192,8 +192,7 @@ def transformed(self, mt='text/x-html-safe'):
class AddForm(base_AddForm):
"""Portlet add form.

- This is registered in configure.zcml. The form_fields variable tells
- zope.formlib which fields to display. The create() method actually
+ This is registered in configure.zcml. The create() method actually
constructs the assignment that is being added.
"""
if USE_AUTOFORM:
@@ -212,10 +211,9 @@ def create(self, data):


class EditForm(base_EditForm):
- """Portlet edit form.
+ """Portlet edit form

- This is registered with configure.zcml. The form_fields variable tells
- zope.formlib which fields to display.
+ This is registered in configure.zcml.
"""
if USE_AUTOFORM:
schema = IStaticPortlet
M CHANGES.rst
M Products/Archetypes/tests/test_widgets.py

diff --git a/CHANGES.rst b/CHANGES.rst
index e007568..0b26e5b 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -14,7 +14,8 @@ New features:

Bug fixes:

-- *add item here*
+- More flexible test of getBestIcon.
+ [jensens]


1.11.3 (2016-10-03)
diff --git a/Products/Archetypes/tests/test_widgets.py b/Products/Archetypes/tests/test_widgets.py
index e3efc21..7058dae 100644
--- a/Products/Archetypes/tests/test_widgets.py
+++ b/Products/Archetypes/tests/test_widgets.py
@@ -305,7 +305,7 @@ def test_rich_text_widget(self):

def test_getBestIcon(self):
doc = makeContent(self.folder, 'SimpleType', id='doc')
- self.assertEqual(doc.getBestIcon(), 'txt.png')
+ self.assertTrue(doc.getBestIcon().endswith('txt.png'))

def test_vocabulary_enforced(self):
doc = makeContent(self.folder, portal_type='ComplexType', id='demodoc')


0 comments on commit f430ad1

Please sign in to comment.