'When there is youtube_sub exist but no html5_sub present for
html5_sources, editor_saved function will generate new html5_sub
for video.'

@ddt.data(TEST_DATA_MONGO_MODULESTORE, TEST_DATA_SPLIT_MODULESTORE)
def test_editor_saved_when_html5_sub_not_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)
    item.sub = '3_yD_cEKoCk'
    with self.assertRaises(NotFoundError):
        Transcript.get_asset(item.location, 'subs_video.srt.sjson')
    old_metadata = own_metadata(item)
    item.editor_saved(self.user, old_metadata, None)
    self.assertIsInstance(Transcript.get_asset(item.location, 'subs_3_yD_cEKoCk.srt.sjson'), StaticContent)
    self.assertIsInstance(Transcript.get_asset(item.location, 'subs_video.srt.sjson'), StaticContent)
