diff options
Diffstat (limited to 'openstackclient/tests/common/test_parseractions.py')
| -rw-r--r-- | openstackclient/tests/common/test_parseractions.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/openstackclient/tests/common/test_parseractions.py b/openstackclient/tests/common/test_parseractions.py index 5c5ca3d3..894b224c 100644 --- a/openstackclient/tests/common/test_parseractions.py +++ b/openstackclient/tests/common/test_parseractions.py @@ -49,16 +49,13 @@ class TestKeyValueAction(utils.TestCase): self.assertDictEqual(expect, actual) def test_error_values(self): - results = self.parser.parse_args([ - '--property', 'red', - '--property', 'green=100%', - '--property', 'blue', - ]) - - actual = getattr(results, 'property', {}) - # There should be no red or blue - expect = {'green': '100%', 'format': '#rgb'} - self.assertDictEqual(expect, actual) + self.assertRaises( + argparse.ArgumentTypeError, + self.parser.parse_args, + [ + '--property', 'red', + ] + ) class TestMultiKeyValueAction(utils.TestCase): |
