Skip to content

Commit

Permalink
Fix service names in BackendDict initialisations (#68)
Browse files Browse the repository at this point in the history
Co-authored-by: Viren Nadkarni <viren.nadkarni@gmail.com>
  • Loading branch information
giograno and viren-nadkarni committed Apr 11, 2024
1 parent b55d69f commit 41fb28a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion moto/applicationautoscaling/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,6 @@ def update(
self.end_time = end_time


applicationautoscaling_backends = BackendDict(ApplicationAutoscalingBackend, "ec2")
applicationautoscaling_backends = BackendDict(
ApplicationAutoscalingBackend, "application-autoscaling"
)
2 changes: 1 addition & 1 deletion moto/elb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,4 +665,4 @@ def detach_load_balancer_from_subnets(


# Use the same regions as EC2
elb_backends = BackendDict(ELBBackend, "ec2")
elb_backends = BackendDict(ELBBackend, "elb")
2 changes: 1 addition & 1 deletion moto/elbv2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1979,4 +1979,4 @@ def _get_resource_by_arn(self, arn: str) -> Any:
return resource


elbv2_backends = BackendDict(ELBv2Backend, "ec2")
elbv2_backends = BackendDict(ELBv2Backend, "elbv2")
2 changes: 1 addition & 1 deletion moto/opsworks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,4 +629,4 @@ def start_instance(self, instance_id: str) -> None:
self.instances[instance_id].start()


opsworks_backends = BackendDict(OpsWorksBackend, "ec2")
opsworks_backends = BackendDict(OpsWorksBackend, "opsworks")
2 changes: 1 addition & 1 deletion moto/signer/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ def untag_resource(self, resource_arn: str, tag_keys: List[str]) -> None:

# 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")

0 comments on commit 41fb28a

Please sign in to comment.