'Tests the `VideoModule` `get_html` where `edx_video_id` is given and related video is found'

def test_get_html_with_existing_edx_video_id(self):

    edx_video_id = 'thundercats'
    encoded_videos = self.encode_and_create_video(edx_video_id)
    data = {'download_video': 'true', 'source': 'example_source.mp4', 'sources': '\n                                                                <source    src="example.mp4"/>\n                                                                <source    src="example.webm"/>\n                                                ', 'edx_video_id': edx_video_id, 'result': {'download_video_link': u'http://fake-video.edx.org/{}.mp4'.format(edx_video_id), 'sources': ([u'example.mp4', u'example.webm'] + [video['url'] for video in encoded_videos])}}
    (context, expected_context) = self.helper_get_html_with_edx_video_id(data)
    self.assertEqual(context, self.item_descriptor.xmodule_runtime.render_template('video.html', expected_context))
