<s> import sys <EOL> from neutronclient . neutron . v2_0 . flavor import flavor_profile <EOL> from neutronclient . tests . unit import test_cli20 <EOL> class CLITestV20FlavorProfileJSON ( test_cli20 . CLITestV20Base ) : <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( CLITestV20FlavorProfileJSON , self ) . setUp ( <EOL> plurals = { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> self . register_non_admin_status_resource ( '<STR_LIT>' ) <EOL> def test_create_flavor_profile_with_mandatory_params ( self ) : <EOL> """<STR_LIT>""" <EOL> resource = '<STR_LIT>' <EOL> cmd = flavor_profile . CreateFlavorProfile ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> name = '<STR_LIT>' <EOL> description = '<STR_LIT>' <EOL> myid = '<STR_LIT>' <EOL> metainfo = "<STR_LIT>" <EOL> position_names = [ '<STR_LIT:description>' , '<STR_LIT>' ] <EOL> position_values = [ description , metainfo ] <EOL> args = [ '<STR_LIT>' , description , '<STR_LIT>' , metainfo ] <EOL> self . _test_create_resource ( resource , cmd , name , myid , args , <EOL> position_names , position_values ) <EOL> def test_create_flavor_profile_with_optional_params ( self ) : <EOL> """<STR_LIT>""" <EOL> resource = '<STR_LIT>' <EOL> cmd = flavor_profile . CreateFlavorProfile ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> name = '<STR_LIT>' <EOL> description = '<STR_LIT>' <EOL> myid = '<STR_LIT>' <EOL> driver = '<STR_LIT>' <EOL> metainfo = "<STR_LIT>" <EOL> position_names = [ '<STR_LIT:description>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> position_values = [ description , driver , metainfo , '<STR_LIT:False>' ] <EOL> args = [ '<STR_LIT>' , description , '<STR_LIT>' , driver , <EOL> '<STR_LIT>' , metainfo , '<STR_LIT>' ] <EOL> self . _test_create_resource ( resource , cmd , name , myid , args , <EOL> position_names , position_values ) <EOL> def test_list_flavor_profiles ( self ) : <EOL> """<STR_LIT>""" <EOL> resources = '<STR_LIT>' <EOL> cmd = flavor_profile . ListFlavorProfile ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> self . _test_list_resources ( resources , cmd , True ) <EOL> def test_list_flavor_profiles_with_pagination ( self ) : <EOL> """<STR_LIT>""" <EOL> resources = '<STR_LIT>' <EOL> cmd = flavor_profile . ListFlavorProfile ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> self . _test_list_resources_with_pagination ( resources , cmd ) <EOL> def test_list_flavor_profiles_with_sort ( self ) : <EOL> """<STR_LIT>""" <EOL> resources = '<STR_LIT>' <EOL> cmd = flavor_profile . ListFlavorProfile ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> self . _test_list_resources ( resources , cmd , <EOL> sort_key = [ "<STR_LIT:description>" ] , <EOL> sort_dir = [ "<STR_LIT>" ] ) <EOL> def test_show_flavor_profile ( self ) : <EOL> """<STR_LIT>""" <EOL> resource = '<STR_LIT>' <EOL> cmd = flavor_profile . ShowFlavorProfile ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> args = [ '<STR_LIT>' , '<STR_LIT:id>' , self . test_id ] <EOL> self . _test_show_resource ( resource , cmd , self . test_id , args , [ '<STR_LIT:id>' ] ) <EOL> def test_update_flavor_profile ( self ) : <EOL> """<STR_LIT>""" <EOL> resource = '<STR_LIT>' <EOL> cmd = flavor_profile . UpdateFlavorProfile ( <EOL> test_cli20 . MyApp ( sys . stdout ) , None ) <EOL> newdescription = '<STR_LIT>' <EOL> newdriver = '<STR_LIT>' <EOL> newmetainfo = "<STR_LIT>" <EOL> newenabled = "<STR_LIT:False>" <EOL> args = [ '<STR_LIT>' , newdescription , <EOL> '<STR_LIT>' , newdriver , <EOL> '<STR_LIT>' , newmetainfo , <EOL> '<STR_LIT>' , newenabled , <EOL> self . test_id ] <EOL> self . _test_update_resource ( resource , cmd , self . test_id , args , <EOL> { '<STR_LIT:description>' : newdescription , <EOL> '<STR_LIT>' : newdriver , <EOL> '<STR_LIT>' : newmetainfo , <EOL> '<STR_LIT>' : newenabled } ) <EOL> def test_delete_flavor_profile ( self ) : <EOL> """<STR_LIT>""" <EOL> resource = '<STR_LIT>' <EOL> cmd = flavor_profile . DeleteFlavorProfile ( test_cli20 . MyApp ( sys . stdout ) , <EOL> None ) <EOL> my_id = '<STR_LIT>' <EOL> args = [ my_id ] <EOL> self . _test_delete_resource ( resource , cmd , my_id , args ) </s>
