summaryrefslogtreecommitdiff
path: root/yaksh/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/tests.py')
-rw-r--r--yaksh/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/yaksh/tests.py b/yaksh/tests.py
index cc3100e..1a5c8ee 100644
--- a/yaksh/tests.py
+++ b/yaksh/tests.py
@@ -355,6 +355,11 @@ class AnswerPaperTestCases(unittest.TestCase):
self.assertTrue(self.answerpaper.passed)
self.assertFalse(self.answerpaper.is_attempt_inprogress())
+ def test_set_end_time(self):
+ current_time = datetime.now()
+ self.answerpaper.set_end_time(current_time)
+ self.assertEqual(self.answerpaper.end_time,current_time)
+
def test_get_question_answer(self):
""" Test get_question_answer() method of Answer Paper"""
answered = self.answerpaper.get_question_answers()
@@ -375,6 +380,11 @@ class AnswerPaperTestCases(unittest.TestCase):
self.assertEqual(answers.count(), 1)
self.assertTrue(answers[0], self.answer_wrong)
+ def test_set_marks (self):
+ self.answer_wrong.set_marks(0.5)
+ self.assertEqual(self.answer_wrong.marks, 0.5)
+
+
###############################################################################
class CourseTestCases(unittest.TestCase):
def setUp(self):