web/test/unittest_views_navigation.py
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 04 Aug 2009 15:30:54 +0200
changeset 2676 1282a15eb20f
parent 2664 1578e1a57828
child 2721 f809857610cc
permissions -rw-r--r--
[navigation] split tests, add test for __start out of bound
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1977
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1723
diff changeset
     1
"""cubicweb.web.views.navigation unit tests
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1723
diff changeset
     2
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1723
diff changeset
     3
:organization: Logilab
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1723
diff changeset
     4
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1723
diff changeset
     5
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1723
diff changeset
     6
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
606923dff11b big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 1723
diff changeset
     7
"""
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     8
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
     9
from logilab.common.testlib import unittest_main, mock_object
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    10
from cubicweb.devtools.apptest import EnvBasedTC
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    11
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    12
from cubicweb.web.views.navigation import PageNavigation, SortedNavigation
47
54087a269bdd fix tests (some where broken after ECache was added)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 16
diff changeset
    13
from cubicweb.web.views.ibreadcrumbs import BreadCrumbEntityVComponent
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    14
47
54087a269bdd fix tests (some where broken after ECache was added)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 16
diff changeset
    15
BreadCrumbEntityVComponent.visible = True
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    16
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    17
class NavigationTC(EnvBasedTC):
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
    18
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    19
    def test_navigation_selection_whatever(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    20
        req = self.request()
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    21
        rset = self.execute('Any X,N WHERE X name N')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    22
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    23
        self.assertIsInstance(navcomp, PageNavigation)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    24
        req.set_search_state('W:X:Y:Z')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    25
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    26
        self.assertIsInstance(navcomp, PageNavigation)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    27
        req.set_search_state('normal')
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    28
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    29
    def test_navigation_selection_ordered(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    30
        req = self.request()
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    31
        rset = self.execute('Any X,N ORDERBY N WHERE X name N')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    32
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    33
        self.assertIsInstance(navcomp, SortedNavigation)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    34
        req.set_search_state('W:X:Y:Z')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    35
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    36
        self.assertIsInstance(navcomp, SortedNavigation)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    37
        req.set_search_state('normal')
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    38
        html = navcomp.render()
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    39
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    40
    def test_navigation_selection_not_enough(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    41
        req = self.request()
16
a70ece4d9d1a fix tests in web/test
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents: 0
diff changeset
    42
        rset = self.execute('Any X,N LIMIT 10 WHERE X name N')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    43
        navcomp = self.vreg['components'].select_object('navigation', req, rset=rset)
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    44
        self.assertEquals(navcomp, None)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    45
        req.set_search_state('W:X:Y:Z')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    46
        navcomp = self.vreg['components'].select_object('navigation', req, rset=rset)
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    47
        self.assertEquals(navcomp, None)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    48
        req.set_search_state('normal')
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    49
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    50
    def test_navigation_selection_not_enough(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    51
        req = self.request()
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    52
        rset = self.execute('Any N, COUNT(RDEF) GROUPBY N ORDERBY N WHERE RDEF relation_type RT, RT name N')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    53
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    54
        self.assertIsInstance(navcomp, SortedNavigation)
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    55
        req.set_search_state('W:X:Y:Z')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    56
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    57
        self.assertIsInstance(navcomp, SortedNavigation)
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
    58
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    59
    def test_navigation_selection_wrong_boundary(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    60
        req = self.request()
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    61
        rset = self.execute('Any X,N WHERE X name N')
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    62
        req = self.request()
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    63
        req.form['__start'] = 1000000
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    64
        print 'len', len(rset)
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    65
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
    66
        html = navcomp.render()
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    67
        print html
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    68
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    69
    def test_sorted_navigation_1(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    70
        req = self.request()
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    71
        rset = self.execute('Any RDEF ORDERBY RT WHERE RDEF relation_type RT')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    72
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
    73
        html = navcomp.render()
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    74
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    75
    def test_sorted_navigation_2(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    76
        req = self.request()
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    77
        rset = self.execute('Any RDEF ORDERBY RDEF WHERE RDEF relation_type RT')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    78
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
    79
        html = navcomp.render()
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    80
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    81
    def test_sorted_navigation_3(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    82
        req = self.request()
1398
5fe84a5f7035 rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents: 47
diff changeset
    83
        rset = self.execute('CWAttribute RDEF ORDERBY RDEF')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    84
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
    85
        html = navcomp.render()
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    86
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    87
    def test_sorted_navigation_4(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    88
        req = self.request()
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    89
        rset = self.execute('Any RDEF ORDERBY N WHERE RDEF relation_type RT, RT name N')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    90
        navcomp = self.vreg['components'].select('navigation', req, rset=rset)
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
    91
        html = navcomp.render()
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    92
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    93
    def test_sorted_navigation_5(self):
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
    94
        req = self.request()
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    95
        rset = self.execute('Any N, COUNT(RDEF) GROUPBY N ORDERBY N WHERE RDEF relation_type RT, RT name N')
2661
f8df42c9da6b [vreg api update] remove some deprecation warnings
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2058
diff changeset
    96
        navcomp = self.vreg['components'].select('navigation', rset.req, rset=rset)
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
    97
        html = navcomp.render()
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    98
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
    99
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   100
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   101
class ContentNavigationTC(EnvBasedTC):
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   102
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   103
    def test_component_context(self):
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   104
        view = mock_object(is_primary=lambda x: True)
1398
5fe84a5f7035 rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents: 47
diff changeset
   105
        rset = self.execute('CWUser X LIMIT 1')
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   106
        req = self.request()
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
   107
        objs = self.vreg['contentnavigation'].possible_vobjects(
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
   108
            req, rset=rset, view=view, context='navtop')
47
54087a269bdd fix tests (some where broken after ECache was added)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 16
diff changeset
   109
        # breadcrumbs should be in headers by default
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   110
        clsids = set(obj.id for obj in objs)
47
54087a269bdd fix tests (some where broken after ECache was added)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 16
diff changeset
   111
        self.failUnless('breadcrumbs' in clsids)
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
   112
        objs = self.vreg['contentnavigation'].possible_vobjects(
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
   113
            req, rset=rset, view=view, context='navbottom')
47
54087a269bdd fix tests (some where broken after ECache was added)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 16
diff changeset
   114
        # breadcrumbs should _NOT_ be in footers by default
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   115
        clsids = set(obj.id for obj in objs)
47
54087a269bdd fix tests (some where broken after ECache was added)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 16
diff changeset
   116
        self.failIf('breadcrumbs' in clsids)
1398
5fe84a5f7035 rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents: 47
diff changeset
   117
        self.execute('INSERT CWProperty P: P pkey "contentnavigation.breadcrumbs.context", '
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   118
                     'P value "navbottom"')
47
54087a269bdd fix tests (some where broken after ECache was added)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 16
diff changeset
   119
        # breadcrumbs should now be in footers
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   120
        req.cnx.commit()
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
   121
        objs = self.vreg['contentnavigation'].possible_vobjects(
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
   122
            req, rset=rset, view=view, context='navbottom')
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
   123
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   124
        clsids = [obj.id for obj in objs]
47
54087a269bdd fix tests (some where broken after ECache was added)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 16
diff changeset
   125
        self.failUnless('breadcrumbs' in clsids)
2676
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
   126
        objs = self.vreg['contentnavigation'].possible_vobjects(
1282a15eb20f [navigation] split tests, add test for __start out of bound
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 2664
diff changeset
   127
            req, rset=rset, view=view, context='navtop')
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
   128
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   129
        clsids = [obj.id for obj in objs]
47
54087a269bdd fix tests (some where broken after ECache was added)
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents: 16
diff changeset
   130
        self.failIf('breadcrumbs' in clsids)
1723
30c3a713ab61 View.dispatch -> View.render
sylvain.thenault@logilab.fr
parents: 1398
diff changeset
   131
0
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   132
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   133
if __name__ == '__main__':
b97547f5f1fa Showtime !
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
diff changeset
   134
    unittest_main()