Fixes for tests run on python 2.6.9
This commit is contained in:
parent
618c2a7013
commit
41507e4baa
@ -524,7 +524,7 @@ class RDS2Backend(BaseBackend):
|
||||
}
|
||||
if option_group_kwargs['name'] in self.option_groups:
|
||||
raise RDSClientError('OptionGroupAlreadyExistsFault',
|
||||
'An option group named {} already exists.'.format(option_group_kwargs['name']))
|
||||
'An option group named {0} already exists.'.format(option_group_kwargs['name']))
|
||||
if 'description' not in option_group_kwargs or not option_group_kwargs['description']:
|
||||
raise RDSClientError('InvalidParameterValue',
|
||||
'The parameter OptionGroupDescription must be provided and must not be blank.')
|
||||
@ -545,7 +545,7 @@ class RDS2Backend(BaseBackend):
|
||||
if option_group_name in self.option_groups:
|
||||
return self.option_groups.pop(option_group_name)
|
||||
else:
|
||||
raise RDSClientError('OptionGroupNotFoundFault', 'Specified OptionGroupName: {} not found.'.format(option_group_name))
|
||||
raise RDSClientError('OptionGroupNotFoundFault', 'Specified OptionGroupName: {0} not found.'.format(option_group_name))
|
||||
|
||||
def describe_option_groups(self, option_group_kwargs):
|
||||
option_group_list = []
|
||||
@ -575,7 +575,7 @@ class RDS2Backend(BaseBackend):
|
||||
option_group_list.append(option_group)
|
||||
if not len(option_group_list):
|
||||
raise RDSClientError('OptionGroupNotFoundFault',
|
||||
'Specified OptionGroupName: {} not found.'.format(option_group_kwargs['name']))
|
||||
'Specified OptionGroupName: {0} not found.'.format(option_group_kwargs['name']))
|
||||
return option_group_list[marker:max_records+marker]
|
||||
|
||||
@staticmethod
|
||||
@ -599,10 +599,10 @@ class RDS2Backend(BaseBackend):
|
||||
}
|
||||
}
|
||||
if engine_name not in default_option_group_options:
|
||||
raise RDSClientError('InvalidParameterValue', 'Invalid DB engine: {}'.format(engine_name))
|
||||
raise RDSClientError('InvalidParameterValue', 'Invalid DB engine: {0}'.format(engine_name))
|
||||
if major_engine_version and major_engine_version not in default_option_group_options[engine_name]:
|
||||
raise RDSClientError('InvalidParameterCombination',
|
||||
'Cannot find major version {} for {}'.format(major_engine_version, engine_name))
|
||||
'Cannot find major version {0} for {1}'.format(major_engine_version, engine_name))
|
||||
if major_engine_version:
|
||||
return default_option_group_options[engine_name][major_engine_version]
|
||||
return default_option_group_options[engine_name]['all']
|
||||
@ -610,7 +610,7 @@ class RDS2Backend(BaseBackend):
|
||||
def modify_option_group(self, option_group_name, options_to_include=None, options_to_remove=None, apply_immediately=None):
|
||||
if option_group_name not in self.option_groups:
|
||||
raise RDSClientError('OptionGroupNotFoundFault',
|
||||
'Specified OptionGroupName: {} not found.'.format(option_group_name))
|
||||
'Specified OptionGroupName: {0} not found.'.format(option_group_name))
|
||||
if not options_to_include and not options_to_remove:
|
||||
raise RDSClientError('InvalidParameterValue',
|
||||
'At least one option must be added, modified, or removed.')
|
||||
@ -651,7 +651,7 @@ class RDS2Backend(BaseBackend):
|
||||
return self.subnet_groups[resource_name].get_tags()
|
||||
else:
|
||||
raise RDSClientError('InvalidParameterValue',
|
||||
'Invalid resource name: {}'.format(arn))
|
||||
'Invalid resource name: {0}'.format(arn))
|
||||
return []
|
||||
|
||||
def remove_tags_from_resource(self, arn, tag_keys):
|
||||
|
Loading…
Reference in New Issue
Block a user