summaryrefslogtreecommitdiff
path: root/yaksh/test_views.py
diff options
context:
space:
mode:
authorPrabhu Ramachandran2017-10-05 21:24:56 +0530
committerGitHub2017-10-05 21:24:56 +0530
commita626f3792d03ccd96a1c49c7096076950d020c5a (patch)
tree31364c34ce9b9165541e8e1b8e1c722f36399967 /yaksh/test_views.py
parent72c9a0f2a84925b9f8096702aa702e1deb49e2ce (diff)
parentf5701e1c6ba3700b834257a4b84388485cb8818d (diff)
downloadonline_test-a626f3792d03ccd96a1c49c7096076950d020c5a.tar.gz
online_test-a626f3792d03ccd96a1c49c7096076950d020c5a.tar.bz2
online_test-a626f3792d03ccd96a1c49c7096076950d020c5a.zip
Merge pull request #346 from maheshgudi/hotfix7
Use MCQ/MCC testcases id instead of options to validate answer
Diffstat (limited to 'yaksh/test_views.py')
-rw-r--r--yaksh/test_views.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/yaksh/test_views.py b/yaksh/test_views.py
index 5ef97d6..2d86b77 100644
--- a/yaksh/test_views.py
+++ b/yaksh/test_views.py
@@ -3535,7 +3535,7 @@ class TestQuestionPaper(TestCase):
)
# Given Wrong Answer
- wrong_user_answer = "b"
+ wrong_user_answer = "25"
# When
self.client.post(
@@ -3550,7 +3550,7 @@ class TestQuestionPaper(TestCase):
self.assertEqual(wrong_answer_paper.marks_obtained, 0)
# Given Right Answer
- right_user_answer = "a"
+ right_user_answer = str(self.mcq_based_testcase.id)
# When
self.client.post(
@@ -3575,7 +3575,7 @@ class TestQuestionPaper(TestCase):
)
# Given Right Answer
- right_user_answer = "a"
+ right_user_answer = str(self.mcq_based_testcase.id)
# When
self.client.post(
@@ -3590,7 +3590,7 @@ class TestQuestionPaper(TestCase):
self.assertEqual(updated_answerpaper.marks_obtained, 1)
# Given Wrong Answer
- wrong_user_answer = "b"
+ wrong_user_answer = "25"
# When
self.client.post(
@@ -3615,7 +3615,7 @@ class TestQuestionPaper(TestCase):
)
# Given Right Answer
- right_user_answer = "a"
+ right_user_answer = str(self.mcc_based_testcase.id)
# When
self.client.post(