コード例 #1
0
 def get_effort(self, course):
     """
     Get the representation for SerializerMethodField `effort`
     """
     return CourseDetails.fetch_effort(course.id)
コード例 #2
0
 def test_fetch_effort(self):
     effort_value = 'test_hours_of_effort'
     with self.store.branch_setting(ModuleStoreEnum.Branch.draft_preferred, self.course.id):
         CourseDetails.update_about_item(self.course, 'effort', effort_value, self.user.id)
     self.assertEqual(CourseDetails.fetch_effort(self.course.id), effort_value)