'Create expected context and get actual context returned by `get_html` method.'

def helper_get_html_with_edx_video_id(self, data):

    SOURCE_XML = '\n                                                <video    show_captions="true"\n                                                display_name="A    Name"\n                                                sub="a_sub_file.srt.sjson"    source="{source}"\n                                                download_video="{download_video}"\n                                                start_time="01:00:03"    end_time="01:00:10"\n                                                edx_video_id="{edx_video_id}"\n                                                >\n                                                                {sources}\n                                                </video>\n                                '
    metadata = self.default_metadata_dict
    metadata['sources'] = ''
    initial_context = {'branding_info': None, 'license': None, 'bumper_metadata': 'null', 'cdn_eval': False, 'cdn_exp_group': None, 'display_name': u'A    Name', 'download_video_link': u'example.mp4', 'handout': None, 'id': self.item_descriptor.location.html_id(), 'track': None, 'transcript_download_format': u'srt', 'transcript_download_formats_list': [{'display_name': 'SubRip    (.srt)    file', 'value': 'srt'}, {'display_name': 'Text    (.txt)    file', 'value': 'txt'}], 'poster': 'null', 'metadata': metadata}
    DATA = SOURCE_XML.format(download_video=data['download_video'], source=data['source'], sources=data['sources'], edx_video_id=data['edx_video_id'])
    self.initialize_module(data=DATA)
    context = self.item_descriptor.render(STUDENT_VIEW).content
    expected_context = dict(initial_context)
    expected_context['metadata'].update({'transcriptTranslationUrl': self.item_descriptor.xmodule_runtime.handler_url(self.item_descriptor, 'transcript', 'translation/__lang__').rstrip('/?'), 'transcriptAvailableTranslationsUrl': self.item_descriptor.xmodule_runtime.handler_url(self.item_descriptor, 'transcript', 'available_translations').rstrip('/?'), 'saveStateUrl': (self.item_descriptor.xmodule_runtime.ajax_url + '/save_user_state'), 'sources': data['result']['sources']})
    expected_context.update({'id': self.item_descriptor.location.html_id(), 'download_video_link': data['result']['download_video_link'], 'metadata': json.dumps(expected_context['metadata'])})
    return (context, expected_context)
