'Test that the transcripts are fetched correctly when the the transcript name is set'

@patch('xmodule.video_module.transcripts_utils.requests.get', side_effect=mock_requests_get)
def test_check_youtube_with_transcript_name(self, mock_get):

    self.item.data = '<video    youtube="good_id_2"    />'
    modulestore().update_item(self.item, self.user.id)
    subs = {'start': [100, 200, 240], 'end': [200, 240, 380], 'text': ['subs    #1', 'subs    #2', 'subs    #3']}
    self.save_subs_to_store(subs, 'good_id_2')
    link = reverse('check_transcripts')
    data = {'locator': unicode(self.video_usage_key), 'videos': [{'type': 'youtube', 'video': 'good_id_2', 'mode': 'youtube'}]}
    resp = self.client.get(link, {'data': json.dumps(data)})
    mock_get.assert_any_call('http://video.google.com/timedtext', params={'lang': 'en', 'v': 'good_id_2', 'name': 'Custom'})
    self.assertEqual(resp.status_code, 200)
    self.assertDictEqual(json.loads(resp.content), {u'status': u'Success', u'subs': u'good_id_2', u'youtube_local': True, u'is_youtube_mode': True, u'youtube_server': True, u'command': u'replace', u'current_item_subs': None, u'youtube_diff': True, u'html5_local': [], u'html5_equal': False})
