Exemplo n.º 1
0
 def setUp(self):
     self.request = RequestFactory().get('')
     self.view = setup_view(DataTableSourceView(), self.request)
Exemplo n.º 2
0
 def test_draw(self):
     self.view.request = RequestFactory().get('', {"draw": "1"})
     self.assertEqual(self.view.draw, 1)
Exemplo n.º 3
0
 def test_draw_none(self):
     self.view.request = RequestFactory().get('')
     with self.assertRaises(TypeError):
         self.view.draw
Exemplo n.º 4
0
 def test_order_direction_empty(self):
     self.view.request = RequestFactory().get('')
     self.assertEqual(self.view.order_direction, "")
Exemplo n.º 5
0
 def test_order_direction_asc(self):
     self.view.request = RequestFactory().get('', {"order[0][dir]": "asc"})
     self.assertEqual(self.view.order_direction, "")
Exemplo n.º 6
0
 def test_paging_page_length(self):
     self.view.request = RequestFactory().get('', {"length": "1"})
     self.assertEqual(self.view.paging_page_length, 1)
Exemplo n.º 7
0
 def test_paging_start_record(self):
     self.view.request = RequestFactory().get('', {"start": "1"})
     self.assertEqual(self.view.paging_start_record, 1)
 def setUp(self):
     self.request = RequestFactory().get('/region_assignment/')
     self.request.user = create_user()
     self.view = setup_view(TempLanguageQuestionnaireView(), self.request)