diff --git a/last_commit.txt b/last_commit.txt index 3403e7105e..51af1222e7 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,37 +1,58 @@ -Repository: plone.app.vocabularies +Repository: plone.app.discussion Branch: refs/heads/master -Date: 2016-05-31T10:58:57+02:00 -Author: Vincent Fretin (vincentfretin) -Commit: https://github.com/plone/plone.app.vocabularies/commit/2e42c0e3d50b91d14194391bb19999cceca1e2e4 +Date: 2016-05-31T11:41:34+02:00 +Author: Tom Gross (tomgross) +Commit: https://github.com/plone/plone.app.discussion/commit/085567431f92d5e083702b52aba5c4f4103836d1 -use PMF here because we don't want this dynamic message to be extracted +Make tests work with lxml safe html cleaner (#97) + +* Make tests work with lxml safe html cleaner + +* whitespace fix in test assertion Files changed: -M plone/app/vocabularies/images.py - -diff --git a/plone/app/vocabularies/images.py b/plone/app/vocabularies/images.py -index cd234d7..957206f 100644 ---- a/plone/app/vocabularies/images.py -+++ b/plone/app/vocabularies/images.py -@@ -6,7 +6,7 @@ - from zope.schema.vocabulary import SimpleTerm - from zope.schema.vocabulary import SimpleVocabulary - --_ = MessageFactory('plone') -+PMF = MessageFactory('plone') - - - @provider(IVocabularyFactory) -@@ -15,7 +15,7 @@ def ScalesVocabulary(context): - """ - terms = [] - for scale, (width, height) in getAllowedSizes().iteritems(): -- translated = _( -+ translated = PMF( - 'imagescale_{0:s}'.format(scale), - default='{0:s} ${{width}}x${{height}}'.format(scale), - mapping={'width': str(width), 'height': str(height)}) +M CHANGES.rst +M plone/app/discussion/tests/test_comment.py + +diff --git a/CHANGES.rst b/CHANGES.rst +index 79edea2..a10ba9f 100644 +--- a/CHANGES.rst ++++ b/CHANGES.rst +@@ -10,13 +10,14 @@ Breaking changes: + + New features: + +-- *add item here* ++- Make tests work with lxml safe html cleaner + + Bug fixes: + + - *add item here* + + ++ + 2.4.13 (2016-05-04) + ------------------- + +diff --git a/plone/app/discussion/tests/test_comment.py b/plone/app/discussion/tests/test_comment.py +index b041eb4..daded8b 100644 +--- a/plone/app/discussion/tests/test_comment.py ++++ b/plone/app/discussion/tests/test_comment.py +@@ -151,10 +151,10 @@ def test_mime_type(self): + + def test_getText(self): + comment1 = createObject('plone.Comment') +- comment1.text = 'First paragraph\n\nSecond paragraph' ++ comment1.text = 'First paragraph\n\nSecond_paragraph' + self.assertEqual( +- comment1.getText(), +- '

First paragraph

Second paragraph

' ++ ''.join(comment1.getText().split()), ++ '

Firstparagraph

Second_paragraph

' + ) + + def test_getText_escapes_HTML(self):