Upgrading moto and fixing test that break due to deprecation. (#808)
* Upgrading moto and fixing test that break due to deprecation. * Adding region.
This commit is contained in:
parent
380203eb53
commit
9594f2cd8d
|
@ -1,4 +1,4 @@
|
||||||
import boto
|
import boto3
|
||||||
from moto import mock_sts, mock_elb
|
from moto import mock_sts, mock_elb
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,9 +6,23 @@ from moto import mock_sts, mock_elb
|
||||||
@mock_elb()
|
@mock_elb()
|
||||||
def test_get_all_elbs(app):
|
def test_get_all_elbs(app):
|
||||||
from lemur.plugins.lemur_aws.elb import get_all_elbs
|
from lemur.plugins.lemur_aws.elb import get_all_elbs
|
||||||
conn = boto.ec2.elb.connect_to_region('us-east-1')
|
client = boto3.client('elb', region_name='us-east-1')
|
||||||
|
|
||||||
elbs = get_all_elbs(account_number='123456789012', region='us-east-1')
|
elbs = get_all_elbs(account_number='123456789012', region='us-east-1')
|
||||||
assert not elbs
|
assert not elbs
|
||||||
conn.create_load_balancer('example-lb', ['us-east-1a', 'us-east-1b'], [(443, 5443, 'tcp')])
|
|
||||||
|
client.create_load_balancer(
|
||||||
|
LoadBalancerName='example-lb',
|
||||||
|
Listeners=[
|
||||||
|
{
|
||||||
|
'Protocol': 'string',
|
||||||
|
'LoadBalancerPort': 443,
|
||||||
|
'InstanceProtocol': 'tcp',
|
||||||
|
'InstancePort': 5443,
|
||||||
|
'SSLCertificateId': 'tcp'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
elbs = get_all_elbs(account_number='123456789012', region='us-east-1')
|
elbs = get_all_elbs(account_number='123456789012', region='us-east-1')
|
||||||
assert elbs
|
assert elbs
|
||||||
|
|
Loading…
Reference in New Issue