summaryrefslogtreecommitdiff
path: root/openstackclient/tests/common/test_parseractions.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/tests/common/test_parseractions.py')
-rw-r--r--openstackclient/tests/common/test_parseractions.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/openstackclient/tests/common/test_parseractions.py b/openstackclient/tests/common/test_parseractions.py
index 5c5ca3d3..60d4a8cf 100644
--- a/openstackclient/tests/common/test_parseractions.py
+++ b/openstackclient/tests/common/test_parseractions.py
@@ -13,6 +13,9 @@
# under the License.
#
+# NOTE(dtroyer): This file is deprecated in Jun 2016, remove after 4.x release
+# or Jun 2017.
+
import argparse
from openstackclient.common import parseractions
@@ -49,16 +52,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):