Exemple #1
0
 def setUp(self):
     self.request = RequestFactory().get('')
     self.view = setup_view(DataTableSourceView(), self.request)
Exemple #2
0
 def test_draw(self):
     self.view.request = RequestFactory().get('', {"draw": "1"})
     self.assertEqual(self.view.draw, 1)
Exemple #3
0
 def test_draw_none(self):
     self.view.request = RequestFactory().get('')
     with self.assertRaises(TypeError):
         self.view.draw
Exemple #4
0
 def test_order_direction_empty(self):
     self.view.request = RequestFactory().get('')
     self.assertEqual(self.view.order_direction, "")
Exemple #5
0
 def test_order_direction_asc(self):
     self.view.request = RequestFactory().get('', {"order[0][dir]": "asc"})
     self.assertEqual(self.view.order_direction, "")
Exemple #6
0
 def test_paging_page_length(self):
     self.view.request = RequestFactory().get('', {"length": "1"})
     self.assertEqual(self.view.paging_page_length, 1)
Exemple #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)