本文整理汇总了Python中contentstore.course_group_config.GroupConfiguration.update_usage_info方法的典型用法代码示例。如果您正苦于以下问题:Python GroupConfiguration.update_usage_info方法的具体用法?Python GroupConfiguration.update_usage_info怎么用?Python GroupConfiguration.update_usage_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类contentstore.course_group_config.GroupConfiguration
的用法示例。
在下文中一共展示了GroupConfiguration.update_usage_info方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: verify_validation_update_usage_info
# 需要导入模块: from contentstore.course_group_config import GroupConfiguration [as 别名]
# 或者: from contentstore.course_group_config.GroupConfiguration import update_usage_info [as 别名]
def verify_validation_update_usage_info(self, expected_result, mocked_message, mocked_validation_messages):
"""
Helper method for testing validation information present after update_usage_info.
"""
self._add_user_partitions()
split_test = self._create_content_experiment(cid=0, name_suffix='0')[1]
validation = StudioValidation(split_test.location)
if mocked_message is not None:
validation.add(mocked_message)
mocked_validation_messages.return_value = validation
group_configuration = GroupConfiguration.update_usage_info(
self.store, self.course, self.course.user_partitions[0]
)
self.assertEqual(
expected_result.to_json() if expected_result is not None else None,
group_configuration['usage'][0]['validation']
)