Merge pull request #2698 from asherf/others

Fix more typos.
This commit is contained in:
Bert Blommers 2020-01-24 08:10:26 +00:00 committed by GitHub
commit 8f05d4aa3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 60 additions and 60 deletions

View File

@ -103,7 +103,7 @@ class LogsResponse(BaseResponse):
( (
events, events,
next_backward_token, next_backward_token,
next_foward_token, next_forward_token,
) = self.logs_backend.get_log_events( ) = self.logs_backend.get_log_events(
log_group_name, log_group_name,
log_stream_name, log_stream_name,
@ -117,7 +117,7 @@ class LogsResponse(BaseResponse):
{ {
"events": events, "events": events,
"nextBackwardToken": next_backward_token, "nextBackwardToken": next_backward_token,
"nextForwardToken": next_foward_token, "nextForwardToken": next_forward_token,
} }
) )

View File

@ -986,7 +986,7 @@ class RDS2Backend(BaseBackend):
) )
if option_group_kwargs["engine_name"] not in valid_option_group_engines.keys(): if option_group_kwargs["engine_name"] not in valid_option_group_engines.keys():
raise RDSClientError( raise RDSClientError(
"InvalidParameterValue", "Invalid DB engine: non-existant" "InvalidParameterValue", "Invalid DB engine: non-existent"
) )
if ( if (
option_group_kwargs["major_engine_version"] option_group_kwargs["major_engine_version"]

View File

@ -367,14 +367,14 @@ class RDS2Response(BaseResponse):
def modify_db_parameter_group(self): def modify_db_parameter_group(self):
db_parameter_group_name = self._get_param("DBParameterGroupName") 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 = self.backend.modify_db_parameter_group(
db_parameter_group_name, db_parameter_group_parameters db_parameter_group_name, db_parameter_group_parameters
) )
template = self.response_template(MODIFY_DB_PARAMETER_GROUP_TEMPLATE) template = self.response_template(MODIFY_DB_PARAMETER_GROUP_TEMPLATE)
return template.render(db_parameter_group=db_parameter_group) 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) parameter_group_parameters = defaultdict(dict)
for param_name, value in self.querystring.items(): for param_name, value in self.querystring.items():
if not param_name.startswith("Parameters.Parameter"): if not param_name.startswith("Parameters.Parameter"):

View File

@ -236,8 +236,8 @@ def test_route_table_associations():
@mock_ec2_deprecated @mock_ec2_deprecated
def test_route_table_replace_route_table_association(): def test_route_table_replace_route_table_association():
""" """
Note: Boto has deprecated replace_route_table_assocation (which returns status) Note: Boto has deprecated replace_route_table_association (which returns status)
and now uses replace_route_table_assocation_with_assoc (which returns association ID). and now uses replace_route_table_association_with_assoc (which returns association ID).
""" """
conn = boto.connect_vpc("the_key", "the_secret") conn = boto.connect_vpc("the_key", "the_secret")
vpc = conn.create_vpc("10.0.0.0/16") vpc = conn.create_vpc("10.0.0.0/16")

View File

@ -77,7 +77,7 @@ def test_describe_repositories():
response = client.describe_repositories() response = client.describe_repositories()
len(response["repositories"]).should.equal(2) 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_repository1",
"arn:aws:ecr:us-east-1:012345678910:repository/test_repository0", "arn:aws:ecr:us-east-1:012345678910:repository/test_repository0",
] ]
@ -86,9 +86,9 @@ def test_describe_repositories():
response["repositories"][0]["repositoryArn"], response["repositories"][0]["repositoryArn"],
response["repositories"][1]["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_repository1",
"012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository0", "012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository0",
] ]
@ -97,7 +97,7 @@ def test_describe_repositories():
response["repositories"][0]["repositoryUri"], response["repositories"][0]["repositoryUri"],
response["repositories"][1]["repositoryUri"], response["repositories"][1]["repositoryUri"],
] ]
).should.equal(set(respository_uris)) ).should.equal(set(repository_uris))
@mock_ecr @mock_ecr
@ -108,7 +108,7 @@ def test_describe_repositories_1():
response = client.describe_repositories(registryId="012345678910") response = client.describe_repositories(registryId="012345678910")
len(response["repositories"]).should.equal(2) 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_repository1",
"arn:aws:ecr:us-east-1:012345678910:repository/test_repository0", "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"][0]["repositoryArn"],
response["repositories"][1]["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_repository1",
"012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository0", "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"][0]["repositoryUri"],
response["repositories"][1]["repositoryUri"], response["repositories"][1]["repositoryUri"],
] ]
).should.equal(set(respository_uris)) ).should.equal(set(repository_uris))
@mock_ecr @mock_ecr
@ -147,11 +147,11 @@ def test_describe_repositories_3():
_ = client.create_repository(repositoryName="test_repository0") _ = client.create_repository(repositoryName="test_repository0")
response = client.describe_repositories(repositoryNames=["test_repository1"]) response = client.describe_repositories(repositoryNames=["test_repository1"])
len(response["repositories"]).should.equal(1) len(response["repositories"]).should.equal(1)
respository_arn = "arn:aws:ecr:us-east-1:012345678910:repository/test_repository1" repository_arn = "arn:aws:ecr:us-east-1:012345678910:repository/test_repository1"
response["repositories"][0]["repositoryArn"].should.equal(respository_arn) response["repositories"][0]["repositoryArn"].should.equal(repository_arn)
respository_uri = "012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository1" repository_uri = "012345678910.dkr.ecr.us-east-1.amazonaws.com/test_repository1"
response["repositories"][0]["repositoryUri"].should.equal(respository_uri) response["repositories"][0]["repositoryUri"].should.equal(repository_uri)
@mock_ecr @mock_ecr

View File

@ -726,7 +726,7 @@ def test_delete_service():
@mock_ecs @mock_ecs
def test_update_non_existant_service(): def test_update_non_existent_service():
client = boto3.client("ecs", region_name="us-east-1") client = boto3.client("ecs", region_name="us-east-1")
try: try:
client.update_service( client.update_service(

View File

@ -1391,7 +1391,7 @@ def test_set_security_groups():
len(resp["LoadBalancers"][0]["SecurityGroups"]).should.equal(2) len(resp["LoadBalancers"][0]["SecurityGroups"]).should.equal(2)
with assert_raises(ClientError): with assert_raises(ClientError):
client.set_security_groups(LoadBalancerArn=arn, SecurityGroups=["non_existant"]) client.set_security_groups(LoadBalancerArn=arn, SecurityGroups=["non_existent"])
@mock_elbv2 @mock_elbv2

View File

@ -132,7 +132,7 @@ def test_get_table_versions():
helpers.update_table(client, database_name, table_name, table_input) helpers.update_table(client, database_name, table_name, table_input)
version_inputs["2"] = 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) helpers.update_table(client, database_name, table_name, table_input)
version_inputs["3"] = table_input version_inputs["3"] = table_input

View File

@ -223,7 +223,7 @@ def test_create_stream_without_redshift():
@mock_kinesis @mock_kinesis
def test_deescribe_non_existant_stream(): def test_deescribe_non_existent_stream():
client = boto3.client("firehose", region_name="us-east-1") client = boto3.client("firehose", region_name="us-east-1")
client.describe_delivery_stream.when.called_with( client.describe_delivery_stream.when.called_with(

View File

@ -32,7 +32,7 @@ def test_create_cluster():
@mock_kinesis_deprecated @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 = boto.kinesis.connect_to_region("us-east-1")
conn.describe_stream.when.called_with("not-a-stream").should.throw( conn.describe_stream.when.called_with("not-a-stream").should.throw(
ResourceNotFoundException ResourceNotFoundException

View File

@ -68,7 +68,7 @@ def test_get_databases_paginated():
@mock_rds_deprecated @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 = boto.rds.connect_to_region("us-west-2")
conn.get_all_dbinstances.when.called_with("not-a-db").should.throw(BotoServerError) conn.get_all_dbinstances.when.called_with("not-a-db").should.throw(BotoServerError)
@ -86,7 +86,7 @@ def test_delete_database():
@mock_rds_deprecated @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 = boto.rds.connect_to_region("us-west-2")
conn.delete_dbinstance.when.called_with("not-a-db").should.throw(BotoServerError) conn.delete_dbinstance.when.called_with("not-a-db").should.throw(BotoServerError)
@ -119,7 +119,7 @@ def test_get_security_groups():
@mock_rds_deprecated @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 = boto.rds.connect_to_region("us-west-2")
conn.get_all_dbsecurity_groups.when.called_with("not-a-sg").should.throw( conn.get_all_dbsecurity_groups.when.called_with("not-a-sg").should.throw(
BotoServerError BotoServerError
@ -138,7 +138,7 @@ def test_delete_database_security_group():
@mock_rds_deprecated @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 = boto.rds.connect_to_region("us-west-2")
conn.delete_dbsecurity_group.when.called_with("not-a-db").should.throw( conn.delete_dbsecurity_group.when.called_with("not-a-db").should.throw(
BotoServerError BotoServerError

View File

@ -312,7 +312,7 @@ def test_get_databases_paginated():
@mock_rds2 @mock_rds2
def test_describe_non_existant_database(): def test_describe_non_existent_database():
conn = boto3.client("rds", region_name="us-west-2") conn = boto3.client("rds", region_name="us-west-2")
conn.describe_db_instances.when.called_with( conn.describe_db_instances.when.called_with(
DBInstanceIdentifier="not-a-db" DBInstanceIdentifier="not-a-db"
@ -378,7 +378,7 @@ def test_rename_db_instance():
@mock_rds2 @mock_rds2
def test_modify_non_existant_database(): def test_modify_non_existent_database():
conn = boto3.client("rds", region_name="us-west-2") conn = boto3.client("rds", region_name="us-west-2")
conn.modify_db_instance.when.called_with( conn.modify_db_instance.when.called_with(
DBInstanceIdentifier="not-a-db", AllocatedStorage=20, ApplyImmediately=True DBInstanceIdentifier="not-a-db", AllocatedStorage=20, ApplyImmediately=True
@ -403,7 +403,7 @@ def test_reboot_db_instance():
@mock_rds2 @mock_rds2
def test_reboot_non_existant_database(): def test_reboot_non_existent_database():
conn = boto3.client("rds", region_name="us-west-2") conn = boto3.client("rds", region_name="us-west-2")
conn.reboot_db_instance.when.called_with( conn.reboot_db_instance.when.called_with(
DBInstanceIdentifier="not-a-db" DBInstanceIdentifier="not-a-db"
@ -444,7 +444,7 @@ def test_delete_database():
@mock_rds2 @mock_rds2
def test_delete_non_existant_database(): def test_delete_non_existent_database():
conn = boto3.client("rds2", region_name="us-west-2") conn = boto3.client("rds2", region_name="us-west-2")
conn.delete_db_instance.when.called_with( conn.delete_db_instance.when.called_with(
DBInstanceIdentifier="not-a-db" DBInstanceIdentifier="not-a-db"
@ -663,7 +663,7 @@ def test_describe_option_group():
@mock_rds2 @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 = boto3.client("rds", region_name="us-west-2")
conn.describe_option_groups.when.called_with( conn.describe_option_groups.when.called_with(
OptionGroupName="not-a-option-group" OptionGroupName="not-a-option-group"
@ -688,10 +688,10 @@ def test_delete_option_group():
@mock_rds2 @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 = boto3.client("rds", region_name="us-west-2")
conn.delete_option_group.when.called_with( conn.delete_option_group.when.called_with(
OptionGroupName="non-existant" OptionGroupName="non-existent"
).should.throw(ClientError) ).should.throw(ClientError)
@ -754,10 +754,10 @@ def test_modify_option_group_no_options():
@mock_rds2 @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 = boto3.client("rds", region_name="us-west-2")
conn.modify_option_group.when.called_with( conn.modify_option_group.when.called_with(
OptionGroupName="non-existant", OptionGroupName="non-existent",
OptionsToInclude=[ OptionsToInclude=[
( (
"OptionName", "OptionName",
@ -771,7 +771,7 @@ def test_modify_non_existant_option_group():
@mock_rds2 @mock_rds2
def test_delete_non_existant_database(): def test_delete_non_existent_database():
conn = boto3.client("rds", region_name="us-west-2") conn = boto3.client("rds", region_name="us-west-2")
conn.delete_db_instance.when.called_with( conn.delete_db_instance.when.called_with(
DBInstanceIdentifier="not-a-db" DBInstanceIdentifier="not-a-db"
@ -1053,7 +1053,7 @@ def test_get_security_groups():
@mock_rds2 @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 = boto3.client("rds", region_name="us-west-2")
conn.describe_db_security_groups.when.called_with( conn.describe_db_security_groups.when.called_with(
DBSecurityGroupName="not-a-sg" DBSecurityGroupName="not-a-sg"
@ -1076,7 +1076,7 @@ def test_delete_database_security_group():
@mock_rds2 @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 = boto3.client("rds", region_name="us-west-2")
conn.delete_db_security_group.when.called_with( conn.delete_db_security_group.when.called_with(
DBSecurityGroupName="not-a-db" DBSecurityGroupName="not-a-db"
@ -1615,7 +1615,7 @@ def test_describe_db_parameter_group():
@mock_rds2 @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") conn = boto3.client("rds", region_name="us-west-2")
db_parameter_groups = conn.describe_db_parameter_groups(DBParameterGroupName="test") db_parameter_groups = conn.describe_db_parameter_groups(DBParameterGroupName="test")
len(db_parameter_groups["DBParameterGroups"]).should.equal(0) len(db_parameter_groups["DBParameterGroups"]).should.equal(0)
@ -1669,10 +1669,10 @@ def test_modify_db_parameter_group():
@mock_rds2 @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 = boto3.client("rds", region_name="us-west-2")
conn.delete_db_parameter_group.when.called_with( conn.delete_db_parameter_group.when.called_with(
DBParameterGroupName="non-existant" DBParameterGroupName="non-existent"
).should.throw(ClientError) ).should.throw(ClientError)

View File

@ -566,7 +566,7 @@ def test_bucket_deletion():
# Get non-existing bucket # Get non-existing bucket
conn.get_bucket.when.called_with("foobar").should.throw(S3ResponseError) 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) conn.delete_bucket.when.called_with("foobar").should.throw(S3ResponseError)

View File

@ -174,7 +174,7 @@ def test_bucket_deletion():
# Get non-existing bucket # Get non-existing bucket
conn.get_bucket.when.called_with("foobar").should.throw(S3ResponseError) 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) conn.delete_bucket.when.called_with("foobar").should.throw(S3ResponseError)

View File

@ -88,8 +88,8 @@ def test_list_platform_applications():
conn.create_platform_application(name="application1", platform="APNS") conn.create_platform_application(name="application1", platform="APNS")
conn.create_platform_application(name="application2", platform="APNS") conn.create_platform_application(name="application2", platform="APNS")
applications_repsonse = conn.list_platform_applications() applications_response = conn.list_platform_applications()
applications = applications_repsonse["ListPlatformApplicationsResponse"][ applications = applications_response["ListPlatformApplicationsResponse"][
"ListPlatformApplicationsResult" "ListPlatformApplicationsResult"
]["PlatformApplications"] ]["PlatformApplications"]
applications.should.have.length_of(2) 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="application1", platform="APNS")
conn.create_platform_application(name="application2", platform="APNS") conn.create_platform_application(name="application2", platform="APNS")
applications_repsonse = conn.list_platform_applications() applications_response = conn.list_platform_applications()
applications = applications_repsonse["ListPlatformApplicationsResponse"][ applications = applications_response["ListPlatformApplicationsResponse"][
"ListPlatformApplicationsResult" "ListPlatformApplicationsResult"
]["PlatformApplications"] ]["PlatformApplications"]
applications.should.have.length_of(2) applications.should.have.length_of(2)
@ -110,8 +110,8 @@ def test_delete_platform_application():
application_arn = applications[0]["PlatformApplicationArn"] application_arn = applications[0]["PlatformApplicationArn"]
conn.delete_platform_application(application_arn) conn.delete_platform_application(application_arn)
applications_repsonse = conn.list_platform_applications() applications_response = conn.list_platform_applications()
applications = applications_repsonse["ListPlatformApplicationsResponse"][ applications = applications_response["ListPlatformApplicationsResponse"][
"ListPlatformApplicationsResult" "ListPlatformApplicationsResult"
]["PlatformApplications"] ]["PlatformApplications"]
applications.should.have.length_of(1) applications.should.have.length_of(1)

View File

@ -88,8 +88,8 @@ def test_list_platform_applications():
Name="application2", Platform="APNS", Attributes={} Name="application2", Platform="APNS", Attributes={}
) )
applications_repsonse = conn.list_platform_applications() applications_response = conn.list_platform_applications()
applications = applications_repsonse["PlatformApplications"] applications = applications_response["PlatformApplications"]
applications.should.have.length_of(2) applications.should.have.length_of(2)
@ -103,15 +103,15 @@ def test_delete_platform_application():
Name="application2", Platform="APNS", Attributes={} Name="application2", Platform="APNS", Attributes={}
) )
applications_repsonse = conn.list_platform_applications() applications_response = conn.list_platform_applications()
applications = applications_repsonse["PlatformApplications"] applications = applications_response["PlatformApplications"]
applications.should.have.length_of(2) applications.should.have.length_of(2)
application_arn = applications[0]["PlatformApplicationArn"] application_arn = applications[0]["PlatformApplicationArn"]
conn.delete_platform_application(PlatformApplicationArn=application_arn) conn.delete_platform_application(PlatformApplicationArn=application_arn)
applications_repsonse = conn.list_platform_applications() applications_response = conn.list_platform_applications()
applications = applications_repsonse["PlatformApplications"] applications = applications_response["PlatformApplications"]
applications.should.have.length_of(1) applications.should.have.length_of(1)

View File

@ -806,7 +806,7 @@ def test_filtering_string_array_with_string_no_array_no_match():
topic.publish( topic.publish(
Message="no_match", Message="no_match",
MessageAttributes={ MessageAttributes={
"price": {"DataType": "String.Array", "StringValue": "one hundread"} "price": {"DataType": "String.Array", "StringValue": "one hundred"}
}, },
) )

View File

@ -1197,7 +1197,7 @@ def test_permissions():
client.remove_permission(QueueUrl=queue_url, Label="account2") client.remove_permission(QueueUrl=queue_url, Label="account2")
with assert_raises(ClientError): with assert_raises(ClientError):
client.remove_permission(QueueUrl=queue_url, Label="non_existant") client.remove_permission(QueueUrl=queue_url, Label="non_existent")
@mock_sqs @mock_sqs

View File

@ -5,7 +5,7 @@ from moto.swf.models import ActivityType, Domain, WorkflowType, WorkflowExecutio
# Some useful constants # Some useful constants
# Here are some activity timeouts we use in moto/swf tests ; they're extracted # 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... # intuitive behaviour in moto/swf own tests...
ACTIVITY_TASK_TIMEOUTS = { ACTIVITY_TASK_TIMEOUTS = {
"heartbeatTimeout": "300", # 5 mins "heartbeatTimeout": "300", # 5 mins