commit
8f05d4aa3d
@ -103,7 +103,7 @@ class LogsResponse(BaseResponse):
|
||||
(
|
||||
events,
|
||||
next_backward_token,
|
||||
next_foward_token,
|
||||
next_forward_token,
|
||||
) = self.logs_backend.get_log_events(
|
||||
log_group_name,
|
||||
log_stream_name,
|
||||
@ -117,7 +117,7 @@ class LogsResponse(BaseResponse):
|
||||
{
|
||||
"events": events,
|
||||
"nextBackwardToken": next_backward_token,
|
||||
"nextForwardToken": next_foward_token,
|
||||
"nextForwardToken": next_forward_token,
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -986,7 +986,7 @@ class RDS2Backend(BaseBackend):
|
||||
)
|
||||
if option_group_kwargs["engine_name"] not in valid_option_group_engines.keys():
|
||||
raise RDSClientError(
|
||||
"InvalidParameterValue", "Invalid DB engine: non-existant"
|
||||
"InvalidParameterValue", "Invalid DB engine: non-existent"
|
||||
)
|
||||
if (
|
||||
option_group_kwargs["major_engine_version"]
|
||||
|
@ -367,14 +367,14 @@ class RDS2Response(BaseResponse):
|
||||
|
||||
def modify_db_parameter_group(self):
|
||||
db_parameter_group_name = self._get_param("DBParameterGroupName")
|
||||
db_parameter_group_parameters = self._get_db_parameter_group_paramters()
|
||||
db_parameter_group_parameters = self._get_db_parameter_group_parameters()
|
||||
db_parameter_group = self.backend.modify_db_parameter_group(
|
||||
db_parameter_group_name, db_parameter_group_parameters
|
||||
)
|
||||
template = self.response_template(MODIFY_DB_PARAMETER_GROUP_TEMPLATE)
|
||||
return template.render(db_parameter_group=db_parameter_group)
|
||||
|
||||
def _get_db_parameter_group_paramters(self):
|
||||
def _get_db_parameter_group_parameters(self):
|
||||
parameter_group_parameters = defaultdict(dict)
|
||||
for param_name, value in self.querystring.items():
|
||||
if not param_name.startswith("Parameters.Parameter"):
|
||||
|
@ -236,8 +236,8 @@ def test_route_table_associations():
|
||||
@mock_ec2_deprecated
|
||||
def test_route_table_replace_route_table_association():
|
||||
"""
|
||||
Note: Boto has deprecated replace_route_table_assocation (which returns status)
|
||||
and now uses replace_route_table_assocation_with_assoc (which returns association ID).
|
||||
Note: Boto has deprecated replace_route_table_association (which returns status)
|
||||
and now uses replace_route_table_association_with_assoc (which returns association ID).
|
||||
"""
|
||||
conn = boto.connect_vpc("the_key", "the_secret")
|
||||
vpc = conn.create_vpc("10.0.0.0/16")
|
||||
|
@ -77,7 +77,7 @@ def test_describe_repositories():
|
||||
response = client.describe_repositories()
|
||||
len(response["repositories"]).should.equal(2)
|
||||
|
||||
respository_arns = [
|
||||
repository_arns = [
|
||||
"arn:aws:ecr:us-east-1:012345678910:repository/test_repository1",
|
||||
"arn:aws:ecr:us-east-1:012345678910:repository/test_repository0",
|
||||
]
|
||||
@ -86,9 +86,9 @@ def test_describe_repositories():
|
||||
response["repositories"][0]["repositoryArn"],
|
||||
response["repositories"][1]["repositoryArn"],
|
||||
]
|
||||
).should.equal(set(respository_arns))
|
||||
).should.equal(set(repository_arns))
|
||||
|
||||
respository_uris = [
|
||||
repository_uris = [
|
||||
"012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository1",
|
||||
"012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository0",
|
||||
]
|
||||
@ -97,7 +97,7 @@ def test_describe_repositories():
|
||||
response["repositories"][0]["repositoryUri"],
|
||||
response["repositories"][1]["repositoryUri"],
|
||||
]
|
||||
).should.equal(set(respository_uris))
|
||||
).should.equal(set(repository_uris))
|
||||
|
||||
|
||||
@mock_ecr
|
||||
@ -108,7 +108,7 @@ def test_describe_repositories_1():
|
||||
response = client.describe_repositories(registryId="012345678910")
|
||||
len(response["repositories"]).should.equal(2)
|
||||
|
||||
respository_arns = [
|
||||
repository_arns = [
|
||||
"arn:aws:ecr:us-east-1:012345678910:repository/test_repository1",
|
||||
"arn:aws:ecr:us-east-1:012345678910:repository/test_repository0",
|
||||
]
|
||||
@ -117,9 +117,9 @@ def test_describe_repositories_1():
|
||||
response["repositories"][0]["repositoryArn"],
|
||||
response["repositories"][1]["repositoryArn"],
|
||||
]
|
||||
).should.equal(set(respository_arns))
|
||||
).should.equal(set(repository_arns))
|
||||
|
||||
respository_uris = [
|
||||
repository_uris = [
|
||||
"012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository1",
|
||||
"012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository0",
|
||||
]
|
||||
@ -128,7 +128,7 @@ def test_describe_repositories_1():
|
||||
response["repositories"][0]["repositoryUri"],
|
||||
response["repositories"][1]["repositoryUri"],
|
||||
]
|
||||
).should.equal(set(respository_uris))
|
||||
).should.equal(set(repository_uris))
|
||||
|
||||
|
||||
@mock_ecr
|
||||
@ -147,11 +147,11 @@ def test_describe_repositories_3():
|
||||
_ = client.create_repository(repositoryName="test_repository0")
|
||||
response = client.describe_repositories(repositoryNames=["test_repository1"])
|
||||
len(response["repositories"]).should.equal(1)
|
||||
respository_arn = "arn:aws:ecr:us-east-1:012345678910:repository/test_repository1"
|
||||
response["repositories"][0]["repositoryArn"].should.equal(respository_arn)
|
||||
repository_arn = "arn:aws:ecr:us-east-1:012345678910:repository/test_repository1"
|
||||
response["repositories"][0]["repositoryArn"].should.equal(repository_arn)
|
||||
|
||||
respository_uri = "012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository1"
|
||||
response["repositories"][0]["repositoryUri"].should.equal(respository_uri)
|
||||
repository_uri = "012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository1"
|
||||
response["repositories"][0]["repositoryUri"].should.equal(repository_uri)
|
||||
|
||||
|
||||
@mock_ecr
|
||||
|
@ -726,7 +726,7 @@ def test_delete_service():
|
||||
|
||||
|
||||
@mock_ecs
|
||||
def test_update_non_existant_service():
|
||||
def test_update_non_existent_service():
|
||||
client = boto3.client("ecs", region_name="us-east-1")
|
||||
try:
|
||||
client.update_service(
|
||||
|
@ -1391,7 +1391,7 @@ def test_set_security_groups():
|
||||
len(resp["LoadBalancers"][0]["SecurityGroups"]).should.equal(2)
|
||||
|
||||
with assert_raises(ClientError):
|
||||
client.set_security_groups(LoadBalancerArn=arn, SecurityGroups=["non_existant"])
|
||||
client.set_security_groups(LoadBalancerArn=arn, SecurityGroups=["non_existent"])
|
||||
|
||||
|
||||
@mock_elbv2
|
||||
|
@ -132,7 +132,7 @@ def test_get_table_versions():
|
||||
helpers.update_table(client, database_name, table_name, table_input)
|
||||
version_inputs["2"] = table_input
|
||||
|
||||
# Updateing with an indentical input should still create a new version
|
||||
# Updateing with an identical input should still create a new version
|
||||
helpers.update_table(client, database_name, table_name, table_input)
|
||||
version_inputs["3"] = table_input
|
||||
|
||||
|
@ -223,7 +223,7 @@ def test_create_stream_without_redshift():
|
||||
|
||||
|
||||
@mock_kinesis
|
||||
def test_deescribe_non_existant_stream():
|
||||
def test_deescribe_non_existent_stream():
|
||||
client = boto3.client("firehose", region_name="us-east-1")
|
||||
|
||||
client.describe_delivery_stream.when.called_with(
|
||||
|
@ -32,7 +32,7 @@ def test_create_cluster():
|
||||
|
||||
|
||||
@mock_kinesis_deprecated
|
||||
def test_describe_non_existant_stream():
|
||||
def test_describe_non_existent_stream():
|
||||
conn = boto.kinesis.connect_to_region("us-east-1")
|
||||
conn.describe_stream.when.called_with("not-a-stream").should.throw(
|
||||
ResourceNotFoundException
|
||||
|
@ -68,7 +68,7 @@ def test_get_databases_paginated():
|
||||
|
||||
|
||||
@mock_rds_deprecated
|
||||
def test_describe_non_existant_database():
|
||||
def test_describe_non_existent_database():
|
||||
conn = boto.rds.connect_to_region("us-west-2")
|
||||
conn.get_all_dbinstances.when.called_with("not-a-db").should.throw(BotoServerError)
|
||||
|
||||
@ -86,7 +86,7 @@ def test_delete_database():
|
||||
|
||||
|
||||
@mock_rds_deprecated
|
||||
def test_delete_non_existant_database():
|
||||
def test_delete_non_existent_database():
|
||||
conn = boto.rds.connect_to_region("us-west-2")
|
||||
conn.delete_dbinstance.when.called_with("not-a-db").should.throw(BotoServerError)
|
||||
|
||||
@ -119,7 +119,7 @@ def test_get_security_groups():
|
||||
|
||||
|
||||
@mock_rds_deprecated
|
||||
def test_get_non_existant_security_group():
|
||||
def test_get_non_existent_security_group():
|
||||
conn = boto.rds.connect_to_region("us-west-2")
|
||||
conn.get_all_dbsecurity_groups.when.called_with("not-a-sg").should.throw(
|
||||
BotoServerError
|
||||
@ -138,7 +138,7 @@ def test_delete_database_security_group():
|
||||
|
||||
|
||||
@mock_rds_deprecated
|
||||
def test_delete_non_existant_security_group():
|
||||
def test_delete_non_existent_security_group():
|
||||
conn = boto.rds.connect_to_region("us-west-2")
|
||||
conn.delete_dbsecurity_group.when.called_with("not-a-db").should.throw(
|
||||
BotoServerError
|
||||
|
@ -312,7 +312,7 @@ def test_get_databases_paginated():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_describe_non_existant_database():
|
||||
def test_describe_non_existent_database():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.describe_db_instances.when.called_with(
|
||||
DBInstanceIdentifier="not-a-db"
|
||||
@ -378,7 +378,7 @@ def test_rename_db_instance():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_modify_non_existant_database():
|
||||
def test_modify_non_existent_database():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.modify_db_instance.when.called_with(
|
||||
DBInstanceIdentifier="not-a-db", AllocatedStorage=20, ApplyImmediately=True
|
||||
@ -403,7 +403,7 @@ def test_reboot_db_instance():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_reboot_non_existant_database():
|
||||
def test_reboot_non_existent_database():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.reboot_db_instance.when.called_with(
|
||||
DBInstanceIdentifier="not-a-db"
|
||||
@ -444,7 +444,7 @@ def test_delete_database():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_delete_non_existant_database():
|
||||
def test_delete_non_existent_database():
|
||||
conn = boto3.client("rds2", region_name="us-west-2")
|
||||
conn.delete_db_instance.when.called_with(
|
||||
DBInstanceIdentifier="not-a-db"
|
||||
@ -663,7 +663,7 @@ def test_describe_option_group():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_describe_non_existant_option_group():
|
||||
def test_describe_non_existent_option_group():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.describe_option_groups.when.called_with(
|
||||
OptionGroupName="not-a-option-group"
|
||||
@ -688,10 +688,10 @@ def test_delete_option_group():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_delete_non_existant_option_group():
|
||||
def test_delete_non_existent_option_group():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.delete_option_group.when.called_with(
|
||||
OptionGroupName="non-existant"
|
||||
OptionGroupName="non-existent"
|
||||
).should.throw(ClientError)
|
||||
|
||||
|
||||
@ -754,10 +754,10 @@ def test_modify_option_group_no_options():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_modify_non_existant_option_group():
|
||||
def test_modify_non_existent_option_group():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.modify_option_group.when.called_with(
|
||||
OptionGroupName="non-existant",
|
||||
OptionGroupName="non-existent",
|
||||
OptionsToInclude=[
|
||||
(
|
||||
"OptionName",
|
||||
@ -771,7 +771,7 @@ def test_modify_non_existant_option_group():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_delete_non_existant_database():
|
||||
def test_delete_non_existent_database():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.delete_db_instance.when.called_with(
|
||||
DBInstanceIdentifier="not-a-db"
|
||||
@ -1053,7 +1053,7 @@ def test_get_security_groups():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_get_non_existant_security_group():
|
||||
def test_get_non_existent_security_group():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.describe_db_security_groups.when.called_with(
|
||||
DBSecurityGroupName="not-a-sg"
|
||||
@ -1076,7 +1076,7 @@ def test_delete_database_security_group():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_delete_non_existant_security_group():
|
||||
def test_delete_non_existent_security_group():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.delete_db_security_group.when.called_with(
|
||||
DBSecurityGroupName="not-a-db"
|
||||
@ -1615,7 +1615,7 @@ def test_describe_db_parameter_group():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_describe_non_existant_db_parameter_group():
|
||||
def test_describe_non_existent_db_parameter_group():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
db_parameter_groups = conn.describe_db_parameter_groups(DBParameterGroupName="test")
|
||||
len(db_parameter_groups["DBParameterGroups"]).should.equal(0)
|
||||
@ -1669,10 +1669,10 @@ def test_modify_db_parameter_group():
|
||||
|
||||
|
||||
@mock_rds2
|
||||
def test_delete_non_existant_db_parameter_group():
|
||||
def test_delete_non_existent_db_parameter_group():
|
||||
conn = boto3.client("rds", region_name="us-west-2")
|
||||
conn.delete_db_parameter_group.when.called_with(
|
||||
DBParameterGroupName="non-existant"
|
||||
DBParameterGroupName="non-existent"
|
||||
).should.throw(ClientError)
|
||||
|
||||
|
||||
|
@ -566,7 +566,7 @@ def test_bucket_deletion():
|
||||
# Get non-existing bucket
|
||||
conn.get_bucket.when.called_with("foobar").should.throw(S3ResponseError)
|
||||
|
||||
# Delete non-existant bucket
|
||||
# Delete non-existent bucket
|
||||
conn.delete_bucket.when.called_with("foobar").should.throw(S3ResponseError)
|
||||
|
||||
|
||||
|
@ -174,7 +174,7 @@ def test_bucket_deletion():
|
||||
# Get non-existing bucket
|
||||
conn.get_bucket.when.called_with("foobar").should.throw(S3ResponseError)
|
||||
|
||||
# Delete non-existant bucket
|
||||
# Delete non-existent bucket
|
||||
conn.delete_bucket.when.called_with("foobar").should.throw(S3ResponseError)
|
||||
|
||||
|
||||
|
@ -88,8 +88,8 @@ def test_list_platform_applications():
|
||||
conn.create_platform_application(name="application1", platform="APNS")
|
||||
conn.create_platform_application(name="application2", platform="APNS")
|
||||
|
||||
applications_repsonse = conn.list_platform_applications()
|
||||
applications = applications_repsonse["ListPlatformApplicationsResponse"][
|
||||
applications_response = conn.list_platform_applications()
|
||||
applications = applications_response["ListPlatformApplicationsResponse"][
|
||||
"ListPlatformApplicationsResult"
|
||||
]["PlatformApplications"]
|
||||
applications.should.have.length_of(2)
|
||||
@ -101,8 +101,8 @@ def test_delete_platform_application():
|
||||
conn.create_platform_application(name="application1", platform="APNS")
|
||||
conn.create_platform_application(name="application2", platform="APNS")
|
||||
|
||||
applications_repsonse = conn.list_platform_applications()
|
||||
applications = applications_repsonse["ListPlatformApplicationsResponse"][
|
||||
applications_response = conn.list_platform_applications()
|
||||
applications = applications_response["ListPlatformApplicationsResponse"][
|
||||
"ListPlatformApplicationsResult"
|
||||
]["PlatformApplications"]
|
||||
applications.should.have.length_of(2)
|
||||
@ -110,8 +110,8 @@ def test_delete_platform_application():
|
||||
application_arn = applications[0]["PlatformApplicationArn"]
|
||||
conn.delete_platform_application(application_arn)
|
||||
|
||||
applications_repsonse = conn.list_platform_applications()
|
||||
applications = applications_repsonse["ListPlatformApplicationsResponse"][
|
||||
applications_response = conn.list_platform_applications()
|
||||
applications = applications_response["ListPlatformApplicationsResponse"][
|
||||
"ListPlatformApplicationsResult"
|
||||
]["PlatformApplications"]
|
||||
applications.should.have.length_of(1)
|
||||
|
@ -88,8 +88,8 @@ def test_list_platform_applications():
|
||||
Name="application2", Platform="APNS", Attributes={}
|
||||
)
|
||||
|
||||
applications_repsonse = conn.list_platform_applications()
|
||||
applications = applications_repsonse["PlatformApplications"]
|
||||
applications_response = conn.list_platform_applications()
|
||||
applications = applications_response["PlatformApplications"]
|
||||
applications.should.have.length_of(2)
|
||||
|
||||
|
||||
@ -103,15 +103,15 @@ def test_delete_platform_application():
|
||||
Name="application2", Platform="APNS", Attributes={}
|
||||
)
|
||||
|
||||
applications_repsonse = conn.list_platform_applications()
|
||||
applications = applications_repsonse["PlatformApplications"]
|
||||
applications_response = conn.list_platform_applications()
|
||||
applications = applications_response["PlatformApplications"]
|
||||
applications.should.have.length_of(2)
|
||||
|
||||
application_arn = applications[0]["PlatformApplicationArn"]
|
||||
conn.delete_platform_application(PlatformApplicationArn=application_arn)
|
||||
|
||||
applications_repsonse = conn.list_platform_applications()
|
||||
applications = applications_repsonse["PlatformApplications"]
|
||||
applications_response = conn.list_platform_applications()
|
||||
applications = applications_response["PlatformApplications"]
|
||||
applications.should.have.length_of(1)
|
||||
|
||||
|
||||
|
@ -806,7 +806,7 @@ def test_filtering_string_array_with_string_no_array_no_match():
|
||||
topic.publish(
|
||||
Message="no_match",
|
||||
MessageAttributes={
|
||||
"price": {"DataType": "String.Array", "StringValue": "one hundread"}
|
||||
"price": {"DataType": "String.Array", "StringValue": "one hundred"}
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -1197,7 +1197,7 @@ def test_permissions():
|
||||
client.remove_permission(QueueUrl=queue_url, Label="account2")
|
||||
|
||||
with assert_raises(ClientError):
|
||||
client.remove_permission(QueueUrl=queue_url, Label="non_existant")
|
||||
client.remove_permission(QueueUrl=queue_url, Label="non_existent")
|
||||
|
||||
|
||||
@mock_sqs
|
||||
|
@ -5,7 +5,7 @@ from moto.swf.models import ActivityType, Domain, WorkflowType, WorkflowExecutio
|
||||
|
||||
# Some useful constants
|
||||
# Here are some activity timeouts we use in moto/swf tests ; they're extracted
|
||||
# from semi-real world example, the goal is mostly to have predictible and
|
||||
# from semi-real world example, the goal is mostly to have predictable and
|
||||
# intuitive behaviour in moto/swf own tests...
|
||||
ACTIVITY_TASK_TIMEOUTS = {
|
||||
"heartbeatTimeout": "300", # 5 mins
|
||||
|
Loading…
Reference in New Issue
Block a user