Merge "Fix 'mapping set' return value"
This commit is contained in:
commit
dec06aa89a
openstackclient
@ -183,7 +183,6 @@ class SetMapping(command.Command, _RulesReader):
|
|||||||
rules=rules)
|
rules=rules)
|
||||||
|
|
||||||
mapping._info.pop('links', None)
|
mapping._info.pop('links', None)
|
||||||
return zip(*sorted(six.iteritems(mapping._info)))
|
|
||||||
|
|
||||||
|
|
||||||
class ShowMapping(command.ShowOne):
|
class ShowMapping(command.ShowOne):
|
||||||
|
@ -181,16 +181,12 @@ class TestMappingSet(TestMapping):
|
|||||||
mocker.return_value = identity_fakes.MAPPING_RULES_2
|
mocker.return_value = identity_fakes.MAPPING_RULES_2
|
||||||
with mock.patch("openstackclient.identity.v3.mapping."
|
with mock.patch("openstackclient.identity.v3.mapping."
|
||||||
"SetMapping._read_rules", mocker):
|
"SetMapping._read_rules", mocker):
|
||||||
columns, data = self.cmd.take_action(parsed_args)
|
result = self.cmd.take_action(parsed_args)
|
||||||
self.mapping_mock.update.assert_called_with(
|
self.mapping_mock.update.assert_called_with(
|
||||||
mapping=identity_fakes.mapping_id,
|
mapping=identity_fakes.mapping_id,
|
||||||
rules=identity_fakes.MAPPING_RULES_2)
|
rules=identity_fakes.MAPPING_RULES_2)
|
||||||
|
|
||||||
collist = ('id', 'rules')
|
self.assertIsNone(result)
|
||||||
self.assertEqual(collist, columns)
|
|
||||||
datalist = (identity_fakes.mapping_id,
|
|
||||||
identity_fakes.MAPPING_RULES_2)
|
|
||||||
self.assertEqual(datalist, data)
|
|
||||||
|
|
||||||
def test_set_rules_wrong_file_path(self):
|
def test_set_rules_wrong_file_path(self):
|
||||||
arglist = [
|
arglist = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user