web/test/unittest_breadcrumbs.py
branch3.5
changeset 3184 613064b49331
parent 3176 b94703b131ad
parent 3179 0684544f6d0d
child 3227 f1695b2da6c3
equal deleted inserted replaced
3177:e7ae807554d9 3184:613064b49331
     8         self.execute('SET F2 filed_under F1 WHERE F1 eid %(f1)s, F2 eid %(f2)s',
     8         self.execute('SET F2 filed_under F1 WHERE F1 eid %(f1)s, F2 eid %(f2)s',
     9                      {'f1' : f1.eid, 'f2' : f2.eid})
     9                      {'f1' : f1.eid, 'f2' : f2.eid})
    10         self.commit()
    10         self.commit()
    11         childrset = self.execute('Folder F WHERE F eid %s' % f2.eid)
    11         childrset = self.execute('Folder F WHERE F eid %s' % f2.eid)
    12         self.assertEquals(childrset.get_entity(0,0).view('breadcrumbs'),
    12         self.assertEquals(childrset.get_entity(0,0).view('breadcrumbs'),
    13                           '<a href="http://testing.fr/cubicweb/folder/715" title="">chi&amp;ld</a>')
    13                           '<a href="http://testing.fr/cubicweb/folder/%s" title="">chi&amp;ld</a>' % f1.eid)
    14         ibc = self.vreg['components'].select('breadcrumbs', self.request(), rset=childrset)
    14         ibc = self.vreg['components'].select('breadcrumbs', self.request(), rset=childrset)
    15         self.assertEquals(ibc.render(),
    15         self.assertEquals(ibc.render(),
    16                           """<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/714" title="">par&amp;ent</a>&#160;&gt;&#160;
    16                           """<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;
    17 chi&amp;ld</span>""")
    17 chi&amp;ld</span>""" % f2.eid)