summaryrefslogtreecommitdiff
path: root/openstackclient/tests/identity/v2_0
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2016-05-24 15:56:27 +0200
committerJulien Danjou <julien@danjou.info>2016-05-25 16:13:48 +0200
commite44bb009d36bddc0fdfb6e949ddc293de291dcca (patch)
tree8eb8d16f5b95fdd7b117fc988679799c0bf0e794 /openstackclient/tests/identity/v2_0
parent5ae8f1b7d52ca9c94a01aeef13754b1d5a15a91f (diff)
downloadpython-openstackclient-e44bb009d36bddc0fdfb6e949ddc293de291dcca.tar.gz
keystone: fix catalog output when region is unset
If no region is set in Keystone, null is deserialized as None and the region has None has value, which triggers a type error when building the output string. This patch fixes that. Change-Id: I7637dc2595655cf452f38308f99fe66ac782e16d
Diffstat (limited to 'openstackclient/tests/identity/v2_0')
-rw-r--r--openstackclient/tests/identity/v2_0/test_catalog.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/openstackclient/tests/identity/v2_0/test_catalog.py b/openstackclient/tests/identity/v2_0/test_catalog.py
index 1e27bb3c..d9ae6a80 100644
--- a/openstackclient/tests/identity/v2_0/test_catalog.py
+++ b/openstackclient/tests/identity/v2_0/test_catalog.py
@@ -36,6 +36,12 @@ class TestCatalog(utils.TestCommand):
'internalURL': 'https://internal.two.example.com',
'adminURL': 'https://admin.two.example.com',
},
+ {
+ 'region': None,
+ 'publicURL': 'https://public.none.example.com',
+ 'internalURL': 'https://internal.none.example.com',
+ 'adminURL': 'https://admin.none.example.com',
+ },
],
}
@@ -87,7 +93,10 @@ class TestCatalogList(TestCatalog):
'adminURL: https://admin.one.example.com\n'
'two\n publicURL: https://public.two.example.com\n '
'internalURL: https://internal.two.example.com\n '
- 'adminURL: https://admin.two.example.com\n',
+ 'adminURL: https://admin.two.example.com\n'
+ '<none>\n publicURL: https://public.none.example.com\n '
+ 'internalURL: https://internal.none.example.com\n '
+ 'adminURL: https://admin.none.example.com\n',
), )
self.assertEqual(datalist, tuple(data))
@@ -164,7 +173,10 @@ class TestCatalogShow(TestCatalog):
'adminURL: https://admin.one.example.com\n'
'two\n publicURL: https://public.two.example.com\n '
'internalURL: https://internal.two.example.com\n '
- 'adminURL: https://admin.two.example.com\n',
+ 'adminURL: https://admin.two.example.com\n'
+ '<none>\n publicURL: https://public.none.example.com\n '
+ 'internalURL: https://internal.none.example.com\n '
+ 'adminURL: https://admin.none.example.com\n',
'qwertyuiop',
'supernova',
'compute',