'Get transcript name from transcript_list fetch from youtube server api
depends on language code, default language in YOUTUBE Text Api is "en"'

@patch('xmodule.video_module.transcripts_utils.requests.get')
def test_get_transcript_name_youtube_server_success(self, mock_get):

    youtube_text_api = copy.deepcopy(settings.YOUTUBE['TEXT_API'])
    youtube_text_api['params']['v'] = 'dummy_video_id'
    response_success = '\n                                <transcript_list>\n                                                <track    id="1"    name="Custom"    lang_code="en"    />\n                                                <track    id="0"    name="Custom1"    lang_code="en-GB"/>\n                                </transcript_list>\n                                '
    mock_get.return_value = Mock(status_code=200, text=response_success, content=response_success)
    transcript_name = transcripts_utils.youtube_video_transcript_name(youtube_text_api)
    self.assertEqual(transcript_name, 'Custom')
