summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authormahesh2016-05-04 11:45:00 +0530
committermahesh2016-05-04 11:45:00 +0530
commit7ada338fa018affd304be25c1c0efb935213e4b5 (patch)
tree8d97a709562ac7cf4079da78322ab7190890b0e8 /yaksh
parentc5eb9787a2363a9e54a4ee21a87b3d6029413a92 (diff)
downloadonline_test-7ada338fa018affd304be25c1c0efb935213e4b5.tar.gz
online_test-7ada338fa018affd304be25c1c0efb935213e4b5.tar.bz2
online_test-7ada338fa018affd304be25c1c0efb935213e4b5.zip
rebase changes
Diffstat (limited to 'yaksh')
-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):