summaryrefslogtreecommitdiff
path: root/yaksh/test_models.py
diff options
context:
space:
mode:
authoradityacp2020-03-12 11:30:51 +0530
committeradityacp2020-03-12 11:30:51 +0530
commita2186d263aa8927a47fdb9f3a23ad39841b64b33 (patch)
treebc70fd63803cbfa4d62bc0e651ed3efebd9e8e40 /yaksh/test_models.py
parent050ced8942abf802cf09e6a6f9d23d85a0be0d3f (diff)
downloadonline_test-a2186d263aa8927a47fdb9f3a23ad39841b64b33.tar.gz
online_test-a2186d263aa8927a47fdb9f3a23ad39841b64b33.tar.bz2
online_test-a2186d263aa8927a47fdb9f3a23ad39841b64b33.zip
Fix test to get lesson or quiz for a unit
Diffstat (limited to 'yaksh/test_models.py')
-rw-r--r--yaksh/test_models.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py
index 6e5a26d..a60a1d6 100644
--- a/yaksh/test_models.py
+++ b/yaksh/test_models.py
@@ -322,8 +322,12 @@ class LearningUnitTestCases(unittest.TestCase):
def test_learning_unit(self):
self.assertEqual(self.learning_unit_one.type, 'lesson')
self.assertEqual(self.learning_unit_two.type, 'quiz')
- self.assertEqual(self.learning_unit_one.lesson, self.lesson)
- self.assertEqual(self.learning_unit_two.quiz, self.quiz)
+ self.assertEqual(
+ self.learning_unit_one.get_lesson_or_quiz(), self.lesson
+ )
+ self.assertEqual(
+ self.learning_unit_two.get_lesson_or_quiz(), self.quiz
+ )
self.assertIsNone(self.learning_unit_one.quiz)
self.assertIsNone(self.learning_unit_two.lesson)
self.assertTrue(self.learning_unit_one.check_prerequisite)