'When both youtube_sub and html5_sub already exist then no new
sub will be generated by editor_saved function.'

@ddt.data(TEST_DATA_MONGO_MODULESTORE, TEST_DATA_SPLIT_MODULESTORE)
def test_editor_saved_when_youtube_and_html5_subs_exist(self, default_store):

    self.MODULESTORE = default_store
    self.initialize_module(metadata=self.metadata)
    item = self.store.get_item(self.item_descriptor.location)
    with open(self.file_path, 'r') as myfile:
        save_to_store(myfile.read(), self.file_name, 'text/sjson', item.location)
        save_to_store(myfile.read(), 'subs_video.srt.sjson', 'text/sjson', item.location)
    item.sub = '3_yD_cEKoCk'
    self.assertIsInstance(Transcript.get_asset(item.location, self.file_name), StaticContent)
    self.assertIsInstance(Transcript.get_asset(item.location, 'subs_video.srt.sjson'), StaticContent)
    old_metadata = own_metadata(item)
    with patch('xmodule.video_module.video_module.manage_video_subtitles_save') as manage_video_subtitles_save:
        item.editor_saved(self.user, old_metadata, None)
        self.assertFalse(manage_video_subtitles_save.called)
