File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393TYPE_columns = tuple (sorted (TYPE ))
9494TYPE_data = tuple ((TYPE [x ] for x in sorted (TYPE )))
9595
96+ formatted_type_properties = "foo='bar'"
97+ TYPE_FORMATTED = {
98+ 'id' : type_id ,
99+ 'name' : type_name ,
100+ 'description' : type_description ,
101+ 'properties' : formatted_type_properties
102+ }
103+ TYPE_FORMATTED_columns = tuple (sorted (TYPE_FORMATTED ))
104+ TYPE_FORMATTED_data = tuple ((TYPE_FORMATTED [x ] for x in
105+ sorted (TYPE_FORMATTED )))
106+
96107backup_id = "3c409fe6-4d03-4a06-aeab-18bdcdf3c8f4"
97108backup_volume_id = "bdbae8dc-e6ca-43c0-8076-951cc1b093a4"
98109backup_name = "fake_backup"
Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ def test_type_show(self):
5151 columns , data = self .cmd .take_action (parsed_args )
5252 self .types_mock .get .assert_called_with (volume_fakes .type_id )
5353
54- self .assertEqual (volume_fakes .TYPE_columns , columns )
55- self .assertEqual (volume_fakes .TYPE_data , data )
54+ self .assertEqual (volume_fakes .TYPE_FORMATTED_columns , columns )
55+ self .assertEqual (volume_fakes .TYPE_FORMATTED_data , data )
5656
5757
5858class TestTypeDelete (TestType ):
Original file line number Diff line number Diff line change @@ -65,4 +65,6 @@ def take_action(self, parsed_args):
6565 volume_client = self .app .client_manager .volume
6666 volume_type = utils .find_resource (
6767 volume_client .volume_types , parsed_args .volume_type )
68+ properties = utils .format_dict (volume_type ._info .pop ('extra_specs' ))
69+ volume_type ._info .update ({'properties' : properties })
6870 return zip (* sorted (six .iteritems (volume_type ._info )))
You can’t perform that action at this time.
0 commit comments