summaryrefslogtreecommitdiff
path: root/yaksh/tests.py
diff options
context:
space:
mode:
authorprathamesh2016-04-01 14:40:57 +0530
committerprathamesh2016-04-01 17:04:57 +0530
commit6517faffb2a9d1bef316700380df46abfb1c93b6 (patch)
tree7dc943dbe6e28fef822a15b574415485adcb68f4 /yaksh/tests.py
parent24d5dc7954304510430b1bc5176c61f4977ececd (diff)
downloadonline_test-6517faffb2a9d1bef316700380df46abfb1c93b6.tar.gz
online_test-6517faffb2a9d1bef316700380df46abfb1c93b6.tar.bz2
online_test-6517faffb2a9d1bef316700380df46abfb1c93b6.zip
added a testcase since get_questions_for_answerpaper private method is
removed from the tests.
Diffstat (limited to 'yaksh/tests.py')
-rw-r--r--yaksh/tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/yaksh/tests.py b/yaksh/tests.py
index 0d5380a..bdc9584 100644
--- a/yaksh/tests.py
+++ b/yaksh/tests.py
@@ -235,6 +235,8 @@ class QuestionPaperTestCases(unittest.TestCase):
""" Test get_random_questions() method of Question Paper"""
random_questions_set_1 = self.question_set_1.get_random_questions()
random_questions_set_2 = self.question_set_2.get_random_questions()
+ total_random_questions = len(random_questions_set_1 + random_questions_set_2)
+ self.assertEqual(total_random_questions, 5)
# To check whether random questions are from random_question_set
questions_set_1 = set(self.question_set_1.questions.all())