'Test snapshot can be created with metadata and deleted.'

def test_create_delete_snapshot_with_metadata(self):

    test_meta = {'fake_key': 'fake_value'}
    volume = tests_utils.create_volume(self.context, **self.volume_params)
    snapshot = create_snapshot(volume['id'], size=volume['size'], metadata=test_meta)
    snapshot_id = snapshot.id
    result_dict = snapshot.metadata
    self.assertEqual(test_meta, result_dict)
    self.volume.delete_snapshot(self.context, snapshot)
    self.assertRaises(exception.NotFound, db.snapshot_get, self.context, snapshot_id)
