forked from loafle/openapi-generator-original
fix test cases in python
This commit is contained in:
@@ -221,6 +221,13 @@ class Configuration(object):
|
||||
:return: The Auth Settings information dict.
|
||||
"""
|
||||
return {
|
||||
'api_key':
|
||||
{
|
||||
'type': 'api_key',
|
||||
'in': 'header',
|
||||
'key': 'api_key',
|
||||
'value': self.get_api_key_with_prefix('api_key')
|
||||
},
|
||||
|
||||
'petstore_auth':
|
||||
{
|
||||
@@ -229,13 +236,6 @@ class Configuration(object):
|
||||
'key': 'Authorization',
|
||||
'value': 'Bearer ' + self.access_token
|
||||
},
|
||||
'api_key':
|
||||
{
|
||||
'type': 'api_key',
|
||||
'in': 'header',
|
||||
'key': 'api_key',
|
||||
'value': self.get_api_key_with_prefix('api_key')
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ class EnumTest(object):
|
||||
allowed_values = ["UPPER", "lower"]
|
||||
if enum_string not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `enum_string`, must be one of {0}"
|
||||
.format(allowed_values)
|
||||
"Invalid value for `enum_string` ({0}), must be one of {1}"
|
||||
.format(enum_string, allowed_values)
|
||||
)
|
||||
|
||||
self._enum_string = enum_string
|
||||
@@ -109,8 +109,8 @@ class EnumTest(object):
|
||||
allowed_values = ["1", "-1"]
|
||||
if enum_integer not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `enum_integer`, must be one of {0}"
|
||||
.format(allowed_values)
|
||||
"Invalid value for `enum_integer` ({0}), must be one of {1}"
|
||||
.format(enum_integer, allowed_values)
|
||||
)
|
||||
|
||||
self._enum_integer = enum_integer
|
||||
@@ -138,8 +138,8 @@ class EnumTest(object):
|
||||
allowed_values = ["1.1", "-1.2"]
|
||||
if enum_number not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `enum_number`, must be one of {0}"
|
||||
.format(allowed_values)
|
||||
"Invalid value for `enum_number` ({0}), must be one of {1}"
|
||||
.format(enum_number, allowed_values)
|
||||
)
|
||||
|
||||
self._enum_number = enum_number
|
||||
|
||||
@@ -100,8 +100,8 @@ class MapTest(object):
|
||||
allowed_values = []
|
||||
if map_of_enum_string not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `map_of_enum_string`, must be one of {0}"
|
||||
.format(allowed_values)
|
||||
"Invalid value for `map_of_enum_string` ({0}), must be one of {1}"
|
||||
.format(map_of_enum_string, allowed_values)
|
||||
)
|
||||
|
||||
self._map_of_enum_string = map_of_enum_string
|
||||
|
||||
@@ -181,8 +181,8 @@ class Order(object):
|
||||
allowed_values = ["placed", "approved", "delivered"]
|
||||
if status not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `status`, must be one of {0}"
|
||||
.format(allowed_values)
|
||||
"Invalid value for `status` ({0}), must be one of {1}"
|
||||
.format(status, allowed_values)
|
||||
)
|
||||
|
||||
self._status = status
|
||||
|
||||
@@ -204,8 +204,8 @@ class Pet(object):
|
||||
allowed_values = ["available", "pending", "sold"]
|
||||
if status not in allowed_values:
|
||||
raise ValueError(
|
||||
"Invalid value for `status`, must be one of {0}"
|
||||
.format(allowed_values)
|
||||
"Invalid value for `status` ({0}), must be one of {1}"
|
||||
.format(status, allowed_values)
|
||||
)
|
||||
|
||||
self._status = status
|
||||
|
||||
Reference in New Issue
Block a user