diff --git a/CHANGES.rst b/CHANGES.rst index 2a7e17d..01c8bf4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,9 @@ Changelog 2.2.4 (unreleased) ~~~~~~~~~~~~~~~~~~ -- Nothing changed yet. +- Fix ``test_edit_with_errors`` to not import a private variable from + ``zope.pagetemplate``. Fixes test failure with latest zope.pagetemplate. + [thet] 2.2.3 (2015-07-18) diff --git a/src/five/pt/tests/test_persistenttemplate.py b/src/five/pt/tests/test_persistenttemplate.py index c49a51b..cf7f1a1 100644 --- a/src/five/pt/tests/test_persistenttemplate.py +++ b/src/five/pt/tests/test_persistenttemplate.py @@ -200,14 +200,15 @@ def test_filename_attribute(self): self.assertEqual(template().strip(), u'012') def test_edit_with_errors(self): - from zope.pagetemplate.pagetemplate import _error_start template = self._makeOne('foo', simple_error) # this should not raise: editable_text = get_editable_content(template) # and the errors should be in an xml comment at the start of # the editable text error_prefix = cgi.escape( - '%s\n %s\n-->\n' % (_error_start, '\n '.join(template._v_errors)) + '\n'.format( + '\n '.join(template._v_errors) + ) ) self.assertTrue(editable_text.startswith(error_prefix))