summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
authorankitjavalkar2016-12-22 20:16:00 +0530
committerankitjavalkar2016-12-22 20:32:48 +0530
commit0e56fc6a77ec21db05c9bafb42b1acc652354a32 (patch)
treeadb07f2709621b8906b5047da02010958bebba67 /yaksh/test_models.py
parent42ed7c142e2c4ff4dccdaec2365e22d30bc276dd (diff)
downloadonline_test-0e56fc6a77ec21db05c9bafb42b1acc652354a32.tar.gz
online_test-0e56fc6a77ec21db05c9bafb42b1acc652354a32.tar.bz2
online_test-0e56fc6a77ec21db05c9bafb42b1acc652354a32.zip
- Fix grade user rendering issue when question is skipped
- Modify grade user html template to create readable variables for answer and error
Diffstat (limited to 'yaksh/test_models.py')
-rw-r--r--yaksh/test_models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py
index e5bd104..6764dd0 100644
--- a/yaksh/test_models.py
+++ b/yaksh/test_models.py
@@ -730,8 +730,9 @@ class AnswerPaperTestCases(unittest.TestCase):
""" Test get_question_answer() method of Answer Paper"""
answered = self.answerpaper.get_question_answers()
first_answer = list(answered.values())[0][0]
- self.assertEqual(first_answer[0].answer, 'Demo answer')
- self.assertTrue(first_answer[0].correct)
+ first_answer_obj = first_answer['answer']
+ self.assertEqual(first_answer_obj.answer, 'Demo answer')
+ self.assertTrue(first_answer_obj.correct)
self.assertEqual(len(answered), 2)
def test_is_answer_correct(self):