diff options
author | Prabhu Ramachandran | 2018-06-07 14:24:42 +0530 |
---|---|---|
committer | GitHub | 2018-06-07 14:24:42 +0530 |
commit | 78ce1804d3a82327aa0da1510bb5c03d6bbff3ba (patch) | |
tree | 15aa9ab7a9c5f109d55fe6b5bc37492db58a4237 /yaksh/test_models.py | |
parent | 94d009bde0bdf3565cf31112a38ff3317fb80f3c (diff) | |
parent | 5da8a3537b1ffb51145cbba0500cedda9f2b48da (diff) | |
download | online_test-78ce1804d3a82327aa0da1510bb5c03d6bbff3ba.tar.gz online_test-78ce1804d3a82327aa0da1510bb5c03d6bbff3ba.tar.bz2 online_test-78ce1804d3a82327aa0da1510bb5c03d6bbff3ba.zip |
Merge pull request #469 from adityacp/enhance_course_status
Enhance course status
Diffstat (limited to 'yaksh/test_models.py')
-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 bcd0434..f97b7b2 100644 --- a/yaksh/test_models.py +++ b/yaksh/test_models.py @@ -1729,11 +1729,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) self.quiz1.questionpaper_set.all().delete() # 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 @@ -1743,7 +1744,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): |