ElasticBeanstalk - Fix tests in Python2 and ServerMode
This commit is contained in:
parent
7d524eaec9
commit
551dc02459
3 changed files with 15 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import weakref
|
||||
|
||||
import boto.beanstalk
|
||||
from boto3 import Session
|
||||
|
||||
from moto.core import BaseBackend, BaseModel
|
||||
from .exceptions import InvalidParameterValueError, ResourceNotFoundException
|
||||
|
|
@ -139,6 +139,14 @@ class EBBackend(BaseBackend):
|
|||
raise KeyError()
|
||||
|
||||
|
||||
eb_backends = dict(
|
||||
(region.name, EBBackend(region.name)) for region in boto.beanstalk.regions()
|
||||
)
|
||||
eb_backends = {}
|
||||
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)
|
||||
return template.render(environments=envs,)
|
||||
|
||||
@staticmethod
|
||||
def list_available_solution_stacks():
|
||||
def list_available_solution_stacks(self):
|
||||
return EB_LIST_AVAILABLE_SOLUTION_STACKS
|
||||
|
||||
def update_tags_for_resource(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue