本文整理汇总了Python中common.test.acceptance.pages.studio.settings_group_configurations.GroupConfigurationsPage.get_enrollment_groups方法的典型用法代码示例。如果您正苦于以下问题:Python GroupConfigurationsPage.get_enrollment_groups方法的具体用法?Python GroupConfigurationsPage.get_enrollment_groups怎么用?Python GroupConfigurationsPage.get_enrollment_groups使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.test.acceptance.pages.studio.settings_group_configurations.GroupConfigurationsPage
的用法示例。
在下文中一共展示了GroupConfigurationsPage.get_enrollment_groups方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_one_course_mode
# 需要导入模块: from common.test.acceptance.pages.studio.settings_group_configurations import GroupConfigurationsPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.settings_group_configurations.GroupConfigurationsPage import get_enrollment_groups [as 别名]
def test_one_course_mode(self):
"""
The purpose of this test is to ensure that when there is 1 or fewer course modes
the enrollment track section is not shown.
"""
add_enrollment_course_modes(self.browser, self.course_id, ['audit'])
group_configurations_page = GroupConfigurationsPage(
self.browser,
self.course_info['org'],
self.course_info['number'],
self.course_info['run']
)
group_configurations_page.visit()
self.assertFalse(group_configurations_page.enrollment_track_section_present)
groups = group_configurations_page.get_enrollment_groups()
self.assertEqual(len(groups), 0)
示例2: test_all_course_modes_present
# 需要导入模块: from common.test.acceptance.pages.studio.settings_group_configurations import GroupConfigurationsPage [as 别名]
# 或者: from common.test.acceptance.pages.studio.settings_group_configurations.GroupConfigurationsPage import get_enrollment_groups [as 别名]
def test_all_course_modes_present(self):
"""
This test is meant to ensure that all the course modes show up as groups
on the Group configuration page within the Enrollment Tracks section.
It also checks to make sure that the edit buttons are not available.
"""
add_enrollment_course_modes(self.browser, self.course_id, ['audit', 'verified'])
group_configurations_page = GroupConfigurationsPage(
self.browser,
self.course_info['org'],
self.course_info['number'],
self.course_info['run']
)
group_configurations_page.visit()
self.assertTrue(group_configurations_page.enrollment_track_section_present)
# Make sure the edit buttons are not available.
self.assertFalse(group_configurations_page.enrollment_track_edit_present)
groups = group_configurations_page.get_enrollment_groups()
for g in [self.audit_track, self.verified_track]:
self.assertTrue(g in groups)