ElasticBeanstalk - Fix tests in Python2 and ServerMode
This commit is contained in:
parent
7d524eaec9
commit
551dc02459
@ -23,6 +23,7 @@ from moto.ec2 import ec2_backends
|
|||||||
from moto.ec2_instance_connect import ec2_instance_connect_backends
|
from moto.ec2_instance_connect import ec2_instance_connect_backends
|
||||||
from moto.ecr import ecr_backends
|
from moto.ecr import ecr_backends
|
||||||
from moto.ecs import ecs_backends
|
from moto.ecs import ecs_backends
|
||||||
|
from moto.elasticbeanstalk import eb_backends
|
||||||
from moto.elb import elb_backends
|
from moto.elb import elb_backends
|
||||||
from moto.elbv2 import elbv2_backends
|
from moto.elbv2 import elbv2_backends
|
||||||
from moto.emr import emr_backends
|
from moto.emr import emr_backends
|
||||||
@ -77,6 +78,7 @@ BACKENDS = {
|
|||||||
"ec2_instance_connect": ec2_instance_connect_backends,
|
"ec2_instance_connect": ec2_instance_connect_backends,
|
||||||
"ecr": ecr_backends,
|
"ecr": ecr_backends,
|
||||||
"ecs": ecs_backends,
|
"ecs": ecs_backends,
|
||||||
|
"elasticbeanstalk": eb_backends,
|
||||||
"elb": elb_backends,
|
"elb": elb_backends,
|
||||||
"elbv2": elbv2_backends,
|
"elbv2": elbv2_backends,
|
||||||
"events": events_backends,
|
"events": events_backends,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import weakref
|
import weakref
|
||||||
|
|
||||||
import boto.beanstalk
|
from boto3 import Session
|
||||||
|
|
||||||
from moto.core import BaseBackend, BaseModel
|
from moto.core import BaseBackend, BaseModel
|
||||||
from .exceptions import InvalidParameterValueError, ResourceNotFoundException
|
from .exceptions import InvalidParameterValueError, ResourceNotFoundException
|
||||||
@ -139,6 +139,14 @@ class EBBackend(BaseBackend):
|
|||||||
raise KeyError()
|
raise KeyError()
|
||||||
|
|
||||||
|
|
||||||
eb_backends = dict(
|
eb_backends = {}
|
||||||
(region.name, EBBackend(region.name)) for region in boto.beanstalk.regions()
|
for region in Session().get_available_regions("elasticbeanstalk"):
|
||||||
)
|
eb_backends[region] = EBBackend(region)
|
||||||
|
for region in Session().get_available_regions(
|
||||||
|
"elasticbeanstalk", partition_name="aws-us-gov"
|
||||||
|
):
|
||||||
|
eb_backends[region] = EBBackend(region)
|
||||||
|
for region in Session().get_available_regions(
|
||||||
|
"elasticbeanstalk", partition_name="aws-cn"
|
||||||
|
):
|
||||||
|
eb_backends[region] = EBBackend(region)
|
||||||
|
@ -50,8 +50,7 @@ class EBResponse(BaseResponse):
|
|||||||
template = self.response_template(EB_DESCRIBE_ENVIRONMENTS)
|
template = self.response_template(EB_DESCRIBE_ENVIRONMENTS)
|
||||||
return template.render(environments=envs,)
|
return template.render(environments=envs,)
|
||||||
|
|
||||||
@staticmethod
|
def list_available_solution_stacks(self):
|
||||||
def list_available_solution_stacks():
|
|
||||||
return EB_LIST_AVAILABLE_SOLUTION_STACKS
|
return EB_LIST_AVAILABLE_SOLUTION_STACKS
|
||||||
|
|
||||||
def update_tags_for_resource(self):
|
def update_tags_for_resource(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user