'Scenario: Translations downloading works correctly w/o preliminary saving
Given I have created a Video component
And I edit the component
And I open tab "Advanced"
And I upload transcript files:
|lang_code|filename               |
|uk       |uk_transcripts.srt     |
|zh       |chinese_transcripts.srt|
Then I can download transcript for "zh" language code, that contains text "å¥œ åäœåå­Š"
And I can download transcript for "uk" language code, that contains text "ÐÑÐžÐ²ÑÑ, edX Ð²ÑÑÐ°Ñ Ð²Ð°Ñ."'

def test_translations_download_works_wo_saving(self):

    self._create_video_component()
    self.edit_component()
    self.open_advanced_tab()
    self.video.upload_translation('uk_transcripts.srt', 'uk')
    self.video.upload_translation('chinese_transcripts.srt', 'zh')
    zh_unicode_text = '\xe5\xa5\xbd    \xe5\x90\x84\xe4\xbd\x8d\xe5\x90\x8c\xe5\xad\xa6'.decode('utf-8')
    self.assertTrue(self.video.download_translation('zh', zh_unicode_text))
    uk_unicode_text = '\xd0\x9f\xd1\x80\xd0\xb8\xd0\xb2\xd1\x96\xd1\x82,    edX    \xd0\xb2\xd1\x96\xd1\x82\xd0\xb0\xd1\x94    \xd0\xb2\xd0\xb0\xd1\x81.'.decode('utf-8')
    self.assertTrue(self.video.download_translation('uk', uk_unicode_text))
