'Test that descriptors which set metadata fields in their
constructor are correctly deleted.'

def test_metadata_not_persistence(self):

    self.assertIn('html5_sources', own_metadata(self.video_descriptor))
    attrs_to_strip = {'show_captions', 'youtube_id_1_0', 'youtube_id_0_75', 'youtube_id_1_25', 'youtube_id_1_5', 'start_time', 'end_time', 'source', 'html5_sources', 'track'}
    location = self.video_descriptor.location
    for field_name in attrs_to_strip:
        delattr(self.video_descriptor, field_name)
    self.assertNotIn('html5_sources', own_metadata(self.video_descriptor))
    self.store.update_item(self.video_descriptor, self.user.id)
    module = self.store.get_item(location)
    self.assertNotIn('html5_sources', own_metadata(module))
