Files
lemur/lemur/plugins/lemur_aws/tests/test_elb.py
kevgliss 9594f2cd8d Upgrading moto and fixing test that break due to deprecation. (#808)
* Upgrading moto and fixing test that break due to deprecation.

* Adding region.
2017-05-20 10:40:22 -07:00

29 lines
745 B
Python

import boto3
from moto import mock_sts, mock_elb
@mock_sts()
@mock_elb()
def test_get_all_elbs(app):
from lemur.plugins.lemur_aws.elb import get_all_elbs
client = boto3.client('elb', region_name='us-east-1')
elbs = get_all_elbs(account_number='123456789012', region='us-east-1')
assert not elbs
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')
assert elbs