web/test/unittest_breadcrumbs.py
brancholdstable
changeset 8462 a14b6562082b
parent 7980 c85bea091a6c
child 9643 421604863753
equal deleted inserted replaced
8231:1bb43e31032d 8462:a14b6562082b
     1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
    33         childrset = f2.as_rset()
    33         childrset = f2.as_rset()
    34         ibc = self.vreg['ctxcomponents'].select('breadcrumbs', self.request(), rset=childrset)
    34         ibc = self.vreg['ctxcomponents'].select('breadcrumbs', self.request(), rset=childrset)
    35         l = []
    35         l = []
    36         ibc.render(l.append)
    36         ibc.render(l.append)
    37         self.assertEqual(''.join(l),
    37         self.assertEqual(''.join(l),
    38                           """<span id="breadcrumbs" class="pathbar">&#160;&gt;&#160;<a href="http://testing.fr/cubicweb/Folder">folder_plural</a>&#160;&gt;&#160;<a href="http://testing.fr/cubicweb/folder/%s" title="">par&amp;ent</a>&#160;&gt;&#160;
    38                           """<span id="breadcrumbs" class="pathbar">&#160;&gt;&#160;<a href="http://testing.fr/cubicweb/Folder">Folder_plural</a>&#160;&gt;&#160;<a href="http://testing.fr/cubicweb/folder/%s" title="">par&amp;ent</a>&#160;&gt;&#160;
    39 <a href="http://testing.fr/cubicweb/folder/%s" title="">chi&amp;ld</a></span>""" % (f1.eid, f2.eid))
    39 <a href="http://testing.fr/cubicweb/folder/%s" title="">chi&amp;ld</a></span>""" % (f1.eid, f2.eid))
    40 
    40 
    41 if __name__ == '__main__':
    41 if __name__ == '__main__':
    42     from logilab.common.testlib import unittest_main
    42     from logilab.common.testlib import unittest_main
    43     unittest_main()
    43     unittest_main()