From 712f0cc181efc2ae3d52f5ee3d180bc099f4b793 Mon Sep 17 00:00:00 2001 From: prathamesh Date: Tue, 16 Feb 2016 15:15:04 +0530 Subject: Added tests for status and update_status --- yaksh/tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'yaksh/tests.py') diff --git a/yaksh/tests.py b/yaksh/tests.py index ce1e0e2..9c67c02 100644 --- a/yaksh/tests.py +++ b/yaksh/tests.py @@ -293,6 +293,7 @@ class AnswerPaperTestCases(unittest.TestCase): '2014-06-13 12:20:19.791297') self.assertEqual(self.answerpaper.end_time, '2014-06-13 12:50:19.791297') + self.assertEqual(self.answerpaper.status, 'inprogress') def test_current_question(self): """ Test current_question() method of Answer Paper""" @@ -342,3 +343,10 @@ class AnswerPaperTestCases(unittest.TestCase): self.assertEqual(first_answer.answer, 'Demo answer') self.assertTrue(first_answer.correct) self.assertEqual(len(answered), 2) + + def test_update_status(self): + """ Test update_status method of Answer Paper""" + self.answerpaper.update_status('inprogress') + self.assertEqual(self.answerpaper.status, 'inprogress') + self.answerpaper.update_status('completed') + self.assertEqual(self.answerpaper.status, 'completed') -- cgit