'Tests that the feature flags works correctly on tweaking global flags in combination
with course-specific flags.'

@ddt.data(*itertools.product((True, False), (True, False), (True, False)))
@ddt.unpack
def test_hls_playback_feature_flags(self, global_flag, enabled_for_all_courses, enabled_for_course_1):

    with hls_playback_feature_flags(global_flag=global_flag, enabled_for_all_courses=enabled_for_all_courses, course_id=self.course_id_1, enabled_for_course=enabled_for_course_1):
        self.assertEqual(HLSPlaybackEnabledFlag.feature_enabled(self.course_id_1), (global_flag and (enabled_for_all_courses or enabled_for_course_1)))
        self.assertEqual(HLSPlaybackEnabledFlag.feature_enabled(self.course_id_2), (global_flag and enabled_for_all_courses))
