diff options
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/test_models.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/yaksh/test_models.py b/yaksh/test_models.py index 41730c3..4cea419 100644 --- a/yaksh/test_models.py +++ b/yaksh/test_models.py @@ -1667,11 +1667,12 @@ class CourseTestCases(unittest.TestCase): # for course with no modules self.no_module_course = Course.objects.create( name="test_course", creator=self.creator, enrollment="open") - percent = self.course.percent_completed(self.student1) + modules = self.course.get_learning_modules() + percent = self.course.percent_completed(self.student1, modules) self.assertEqual(percent, 0) # for course with module but zero percent completed - percent = self.course.percent_completed(self.student1) + percent = self.course.percent_completed(self.student1, modules) self.assertEqual(percent, 0) # Add completed unit to course status and check percent @@ -1681,7 +1682,7 @@ class CourseTestCases(unittest.TestCase): course_status = CourseStatus.objects.create( course=self.course, user=self.student1) course_status.completed_units.add(self.completed_unit) - updated_percent = self.course.percent_completed(self.student1) + updated_percent = self.course.percent_completed(self.student1, modules) self.assertEqual(updated_percent, 25) def test_course_time_remaining_to_start(self): |