Two fixes on test_list_available_zones
* Directly invoke method instead of using getattr * Add 'availability_zones' to hyphen_exceptions Change-Id: I287284c1c05aaaaf03cd3080538928e5c900f181
This commit is contained in:
parent
f341b5b644
commit
d50fd0d501
@ -25,7 +25,6 @@ class ListAvailableZonesTest(base.BaseNetworkTest):
|
|||||||
@utils.requires_ext(extension="availability_zone",
|
@utils.requires_ext(extension="availability_zone",
|
||||||
service="network")
|
service="network")
|
||||||
def test_list_available_zones(self):
|
def test_list_available_zones(self):
|
||||||
resource = 'availability_zones'
|
body = self.client.list_availability_zones()
|
||||||
body = getattr(self.client, 'list_%s' % resource)()
|
|
||||||
self.assertIsNotNone(body)
|
self.assertIsNotNone(body)
|
||||||
self.assertIsInstance(body['availability_zones'], list)
|
self.assertIsInstance(body['availability_zones'], list)
|
||||||
|
@ -43,7 +43,7 @@ class NetworkClientJSON(service_client.RestClient):
|
|||||||
|
|
||||||
# The following list represents resource names that do not require
|
# The following list represents resource names that do not require
|
||||||
# changing underscore to a hyphen
|
# changing underscore to a hyphen
|
||||||
hyphen_exceptions = ["service_profiles"]
|
hyphen_exceptions = ["service_profiles", "availability_zones"]
|
||||||
# the following map is used to construct proper URI
|
# the following map is used to construct proper URI
|
||||||
# for the given neutron resource
|
# for the given neutron resource
|
||||||
service_resource_prefix_map = {
|
service_resource_prefix_map = {
|
||||||
|
Loading…
Reference in New Issue
Block a user