--- a/web/test/unittest_breadcrumbs.py Thu Jun 05 17:20:00 2014 +0200
+++ b/web/test/unittest_breadcrumbs.py Tue Jun 03 12:27:26 2014 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of CubicWeb.
@@ -29,14 +29,19 @@
{'f1' : f1.eid, 'f2' : f2.eid})
req.cnx.commit()
self.assertEqual(f2.view('breadcrumbs'),
- '<a href="http://testing.fr/cubicweb/folder/%s" title="">chi&ld</a>' % f2.eid)
+ '<a href="http://testing.fr/cubicweb/folder/%s" title="">'
+ 'chi&ld</a>' % f2.eid)
childrset = f2.as_rset()
ibc = self.vreg['ctxcomponents'].select('breadcrumbs', req, rset=childrset)
l = []
ibc.render(l.append)
- self.assertEqual(''.join(l),
- """<span id="breadcrumbs" class="pathbar"> > <a href="http://testing.fr/cubicweb/Folder">Folder_plural</a> > <a href="http://testing.fr/cubicweb/folder/%s" title="">par&ent</a> > 
-<a href="http://testing.fr/cubicweb/folder/%s" title="">chi&ld</a></span>""" % (f1.eid, f2.eid))
+ self.assertMultiLineEqual('<span id="breadcrumbs" class="pathbar"> > '
+ '<a href="http://testing.fr/cubicweb/Folder">Folder_plural</a>'
+ ' > <a href="http://testing.fr/cubicweb/folder/%s" '
+ 'title="">par&ent</a> > \n'
+ '<a href="http://testing.fr/cubicweb/folder/%s" title="">'
+ 'chi&ld</a></span>' % (f1.eid, f2.eid),
+ ''.join(l))
if __name__ == '__main__':
from logilab.common.testlib import unittest_main