def test_change_category_change(self): change_category( MockRequest(action='test_changeCategory', _selected_action=self.selected, section=self.section.id, subsection=self.subsection.id, change=True), Question.objects.all(), self.msg) self.assertIn('Successfully', self.msg.msg)
def test_change_category_cancel(self): change_category( MockRequest( action='test_changeCategory', _selected_action=self.selected, cancel=True), Question.objects.all(), self.msg) self.assertIn('Canceled', self.msg.msg)
def test_change_category_change(self): change_category( MockRequest( action='test_changeCategory', _selected_action=self.selected, section=self.section.id, subsection=self.subsection.id, change=True), Question.objects.all(), self.msg) self.assertIn('Successfully', self.msg.msg)
def test_change_category_cancel(self): change_category( MockRequest(action='test_changeCategory', _selected_action=self.selected, cancel=True), Question.objects.all(), self.msg) self.assertIn('Canceled', self.msg.msg)
def test_change_category(self): res = change_category(MockRequest(), Question.objects.all(), self.msg) self.assertEquals(res.status_code, 200)