diff options
author | prathamesh | 2016-02-16 15:15:04 +0530 |
---|---|---|
committer | prathamesh | 2016-02-16 15:15:04 +0530 |
commit | 712f0cc181efc2ae3d52f5ee3d180bc099f4b793 (patch) | |
tree | 65ed4ec5202176e977ef9028cc33d1726c92be79 /yaksh/tests.py | |
parent | 5fa372b47e1f70e3d7d3b2df02410f50a86664b2 (diff) | |
download | online_test-712f0cc181efc2ae3d52f5ee3d180bc099f4b793.tar.gz online_test-712f0cc181efc2ae3d52f5ee3d180bc099f4b793.tar.bz2 online_test-712f0cc181efc2ae3d52f5ee3d180bc099f4b793.zip |
Added tests for status and update_status
Diffstat (limited to 'yaksh/tests.py')
-rw-r--r-- | yaksh/tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
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') |