<s> from oslo_config import cfg <EOL> from nova . tests . functional . api_sample_tests import test_servers <EOL> from nova . tests . unit . api . openstack import fakes <EOL> CONF = cfg . CONF <EOL> CONF . import_opt ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> class AssistedVolumeSnapshotsJsonTests ( test_servers . ServersSampleBase ) : <EOL> extension_name = "<STR_LIT>" <EOL> def _get_flags ( self ) : <EOL> f = super ( AssistedVolumeSnapshotsJsonTests , self ) . _get_flags ( ) <EOL> f [ '<STR_LIT>' ] = CONF . osapi_compute_extension [ : ] <EOL> f [ '<STR_LIT>' ] . append ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> return f <EOL> def test_create ( self ) : <EOL> """<STR_LIT>""" <EOL> self . stub_out ( '<STR_LIT>' , <EOL> fakes . stub_compute_volume_snapshot_create ) <EOL> subs = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:type>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } <EOL> response = self . _do_post ( "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> subs ) <EOL> self . _verify_response ( "<STR_LIT>" , <EOL> subs , response , <NUM_LIT:200> ) <EOL> def test_snapshots_delete_assisted ( self ) : <EOL> self . stub_out ( '<STR_LIT>' , <EOL> fakes . stub_compute_volume_snapshot_delete ) <EOL> snapshot_id = '<STR_LIT:100>' <EOL> response = self . _do_delete ( <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> % snapshot_id ) <EOL> self . assertEqual ( <NUM_LIT> , response . status_code ) <EOL> self . assertEqual ( '<STR_LIT>' , response . content ) </s>
