Пример #1
0
 def test_show_basic_empty(self):
     view = ContentsView(self.folder, TestRequest())
     view._getNavigationVars = lambda: {}
     self.assertFalse(view.show_basic())
Пример #2
0
 def test_sort_can_be_changed(self):
     view = ContentsView(self.folder, TestRequest())
     view._getNavigationVars = lambda: {}
     self.assertFalse(view.can_sort_be_changed())
Пример #3
0
 def test_is_orderable(self):
     view = ContentsView(self.folder, TestRequest())
     view._getNavigationVars = lambda: {}
     self.assertFalse(view.is_orderable())
Пример #4
0
 def test_list_batch_items(self):
     view = ContentsView(self.folder, TestRequest())
     view._getNavigationVars = lambda: {}
     self.assertEqual(view.listBatchItems(), ())
Пример #5
0
 def test_getNavigationURL(self):
     url = 'http://example.com/folder_contents'
     self._make_batch()
     view = ContentsView(self.folder, TestRequest(ACTUAL_URL=url))
     view._getNavigationVars = lambda: {}
     self.assertTrue(view._getNavigationURL(25) == url + "?form.b_start=25")
Пример #6
0
 def test_show_basic(self):
     self._make_one()
     view = ContentsView(self.folder, TestRequest())
     view._getNavigationVars = lambda: {}
     self.assertTrue(view.show_basic())