equal
deleted
inserted
replaced
|
1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
|
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
|
3 # |
|
4 # This file is part of CubicWeb. |
|
5 # |
|
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
|
7 # terms of the GNU Lesser General Public License as published by the Free |
|
8 # Software Foundation, either version 2.1 of the License, or (at your option) |
|
9 # any later version. |
|
10 # |
|
11 # logilab-common is distributed in the hope that it will be useful, but WITHOUT |
|
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
|
14 # details. |
|
15 # |
|
16 # You should have received a copy of the GNU Lesser General Public License along |
|
17 # with CubicWeb. If not, see <http://www.gnu.org/licenses/>. |
1 from cubicweb.devtools.testlib import CubicWebTC |
18 from cubicweb.devtools.testlib import CubicWebTC |
2 |
19 |
3 class BreadCrumbsTC(CubicWebTC): |
20 class BreadCrumbsTC(CubicWebTC): |
4 |
21 |
5 def test_base(self): |
22 def test_base(self): |
13 '<a href="http://testing.fr/cubicweb/folder/%s" title="">chi&ld</a>' % f2.eid) |
30 '<a href="http://testing.fr/cubicweb/folder/%s" title="">chi&ld</a>' % f2.eid) |
14 childrset = f2.as_rset() |
31 childrset = f2.as_rset() |
15 ibc = self.vreg['components'].select('breadcrumbs', self.request(), rset=childrset) |
32 ibc = self.vreg['components'].select('breadcrumbs', self.request(), rset=childrset) |
16 self.assertEquals(ibc.render(), |
33 self.assertEquals(ibc.render(), |
17 """<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> >  |
34 """<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> >  |
18 chi&ld</span>""" % f1.eid) |
35 <a href="http://testing.fr/cubicweb/folder/%s" title="">chi&ld</a></span>""" % (f1.eid, f2.eid)) |
19 |
36 |
20 if __name__ == '__main__': |
37 if __name__ == '__main__': |
21 from logilab.common.testlib import unittest_main |
38 from logilab.common.testlib import unittest_main |
22 unittest_main() |
39 unittest_main() |