コード例 #1
0
 def test_getBreadcrumbsHTML(self):
     view = ZodbInfoView(None, None)
     view.getBreadcrumbs = lambda: [('/', 'here'), ('foo>', 'so"there'),
                                    ('/', None), ('bar<baz', None)]
     self.assertEqual(
         view.getBreadcrumbsHTML(), '<a href="here">/</a>'
         '<a href="so&quot;there">foo&gt;</a>'
         '/bar&lt;baz')
コード例 #2
0
ファイル: test_browser.py プロジェクト: imclab/zodbbrowser
 def test_getBreadcrumbsHTML(self):
     view = ZodbInfoView(None, None)
     view.getBreadcrumbs = lambda: [('/', 'here'),
                                    ('foo>', 'so"there'),
                                    ('/', None),
                                    ('bar<baz', None)]
     self.assertEquals(view.getBreadcrumbsHTML(),
                       '<a href="here">/</a>'
                       '<a href="so&quot;there">foo&gt;</a>'
                       '/bar&lt;baz')
コード例 #3
0
ファイル: test_browser.py プロジェクト: imclab/zodbbrowser
 def test_getPath(self):
     view = ZodbInfoView(None, None)
     view.getBreadcrumbs = lambda: [('/', None), ('foo', None),
                                    ('/', None), ('bar baz', None)]
     self.assertEquals(view.getPath(), '/foo/bar baz')
コード例 #4
0
 def test_getPath(self):
     view = ZodbInfoView(None, None)
     view.getBreadcrumbs = lambda: [('/', None), ('foo', None), ('/', None),
                                    ('bar baz', None)]
     self.assertEqual(view.getPath(), '/foo/bar baz')