From f5701e1c6ba3700b834257a4b84388485cb8818d Mon Sep 17 00:00:00 2001 From: maheshgudi Date: Thu, 5 Oct 2017 20:39:22 +0530 Subject: Use MCQ/MCC testcases id instead of options to validate answer --- yaksh/test_views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'yaksh/test_views.py') 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( -- cgit