'Verify val profiles on toggling HLS Playback feature.'

@ddt.data((True, ['youtube', 'desktop_webm', 'desktop_mp4', 'hls']), (False, ['youtube', 'desktop_webm', 'desktop_mp4']))
@ddt.unpack
def test_get_html_on_toggling_hls_feature(self, hls_feature_enabled, expected_val_profiles):

    with patch('xmodule.video_module.video_module.edxval_api.get_urls_for_profiles') as get_urls_for_profiles:
        get_urls_for_profiles.return_value = {'desktop_webm': 'https://webm.com/dw.webm', 'hls': 'https://hls.com/hls.m3u8', 'youtube': 'https://yt.com/?v=v0TFmdO4ZP0', 'desktop_mp4': 'https://mp4.com/dm.mp4'}
        with patch('xmodule.video_module.video_module.HLSPlaybackEnabledFlag.feature_enabled') as feature_enabled:
            feature_enabled.return_value = hls_feature_enabled
            video_xml = '<video    display_name="Video"    download_video="true"    edx_video_id="12345-67890">[]</video>'
            self.initialize_module(data=video_xml)
            self.item_descriptor.render(STUDENT_VIEW)
            get_urls_for_profiles.assert_called_with(self.item_descriptor.edx_video_id, expected_val_profiles)
