summaryrefslogtreecommitdiff
path: root/yaksh/tests.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2016-05-04 18:31:28 +0530
committerPrabhu Ramachandran2016-05-04 18:31:28 +0530
commit8841e5ed4f8f79b7067ddb3523f4a3ec50f362b3 (patch)
treea9db341f13abdf47f994d8823f233219561dbff2 /yaksh/tests.py
parent03f0aa839e4d91a3d83d68d5301f1425f18cca73 (diff)
parentf150f1c54ee5941d72f2e4057af8c90cca588292 (diff)
downloadonline_test-8841e5ed4f8f79b7067ddb3523f4a3ec50f362b3.tar.gz
online_test-8841e5ed4f8f79b7067ddb3523f4a3ec50f362b3.tar.bz2
online_test-8841e5ed4f8f79b7067ddb3523f4a3ec50f362b3.zip
Merge pull request #97 from maheshgudi/grade_user_2
Grade User
Diffstat (limited to 'yaksh/tests.py')
-rw-r--r--yaksh/tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/yaksh/tests.py b/yaksh/tests.py
index cc3100e..d3ff4fc 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,13 @@ 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)
+ self.answer_wrong.set_marks(10.0)
+ self.assertEqual(self.answer_wrong.marks,1.0)
+
+
###############################################################################
class CourseTestCases(unittest.TestCase):
def setUp(self):