From 9fa5e113fe954608eb31547b5b1e5a6691464795 Mon Sep 17 00:00:00 2001 From: Giovanni Grano Date: Mon, 10 Jul 2023 11:00:26 +0200 Subject: [PATCH] Fix service names in BackendDict initialisations (#68) Co-authored-by: Viren Nadkarni --- moto/applicationautoscaling/models.py | 4 +++- moto/elb/models.py | 2 +- moto/elbv2/models.py | 2 +- moto/opsworks/models.py | 2 +- moto/signer/models.py | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/moto/applicationautoscaling/models.py b/moto/applicationautoscaling/models.py index ec384050ab55..0b2546ba043a 100644 --- a/moto/applicationautoscaling/models.py +++ b/moto/applicationautoscaling/models.py @@ -530,4 +530,6 @@ def update( self.end_time = end_time -applicationautoscaling_backends = BackendDict(ApplicationAutoscalingBackend, "ec2") +applicationautoscaling_backends = BackendDict( + ApplicationAutoscalingBackend, "application-autoscaling" +) diff --git a/moto/elb/models.py b/moto/elb/models.py index e70faeafca16..6707346d1797 100644 --- a/moto/elb/models.py +++ b/moto/elb/models.py @@ -657,4 +657,4 @@ def detach_load_balancer_from_subnets( # Use the same regions as EC2 -elb_backends = BackendDict(ELBBackend, "ec2") +elb_backends = BackendDict(ELBBackend, "elb") diff --git a/moto/elbv2/models.py b/moto/elbv2/models.py index 11c31ce39a76..fb2ee34be485 100644 --- a/moto/elbv2/models.py +++ b/moto/elbv2/models.py @@ -1983,4 +1983,4 @@ def _get_resource_by_arn(self, arn: str) -> Any: return resource -elbv2_backends = BackendDict(ELBv2Backend, "ec2") +elbv2_backends = BackendDict(ELBv2Backend, "elbv2") diff --git a/moto/opsworks/models.py b/moto/opsworks/models.py index 221671ddf88f..0943a074200a 100644 --- a/moto/opsworks/models.py +++ b/moto/opsworks/models.py @@ -627,4 +627,4 @@ def start_instance(self, instance_id: str) -> None: self.instances[instance_id].start() -opsworks_backends = BackendDict(OpsWorksBackend, "ec2") +opsworks_backends = BackendDict(OpsWorksBackend, "opsworks") diff --git a/moto/signer/models.py b/moto/signer/models.py index 59395db54d6f..ad6d18c24bee 100644 --- a/moto/signer/models.py +++ b/moto/signer/models.py @@ -197,4 +197,4 @@ def list_signing_platforms(self) -> List[Dict[str, Any]]: # Using the lambda-regions # boto3.Session().get_available_regions("signer") still returns an empty list -signer_backends = BackendDict(SignerBackend, "lambda") +signer_backends = BackendDict(SignerBackend, "signer")