Skip to content

Commit

Permalink
[fc] Repository: plone.app.discussion
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2016-05-31T11:41:34+02:00
Author: Tom Gross (tomgross) <itconsense@gmail.com>
Commit: plone/plone.app.discussion@0855674

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 CHANGES.rst
M plone/app/discussion/tests/test_comment.py
  • Loading branch information
jensens committed May 31, 2016
1 parent 438fb1e commit 2f8f001
Showing 1 changed file with 50 additions and 29 deletions.
79 changes: 50 additions & 29 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -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) <vincent.fretin@gmail.com>
Commit: https://github.com/plone/plone.app.vocabularies/commit/2e42c0e3d50b91d14194391bb19999cceca1e2e4
Date: 2016-05-31T11:41:34+02:00
Author: Tom Gross (tomgross) <itconsense@gmail.com>
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(),
- '<p>First paragraph<br /><br />Second paragraph</p>'
+ ''.join(comment1.getText().split()),
+ '<p>Firstparagraph<br/><br/>Second_paragraph</p>'
)

def test_getText_escapes_HTML(self):


0 comments on commit 2f8f001

Please sign in to comment.