diff --git a/tests/test_elb/test_elb.py b/tests/test_elb/test_elb.py index 5e2377cfd..abfa38e5c 100644 --- a/tests/test_elb/test_elb.py +++ b/tests/test_elb/test_elb.py @@ -1,5 +1,6 @@ from __future__ import unicode_literals import boto +import boto.ec2.elb from boto.ec2.elb import HealthCheck import sure # noqa @@ -28,6 +29,21 @@ def test_create_load_balancer(): listener2.protocol.should.equal("TCP") +@mock_elb +def test_create_elb_in_multiple_region(): + zones = ['us-east-1a', 'us-east-1b'] + ports = [(80, 8080, 'http'), (443, 8443, 'tcp')] + + west1_conn = boto.ec2.elb.connect_to_region("us-west-1") + west1_conn.create_load_balancer('my-lb', zones, ports) + + west2_conn = boto.ec2.elb.connect_to_region("us-west-2") + west2_conn.create_load_balancer('my-lb', zones, ports) + + list(west1_conn.get_all_load_balancers()).should.have.length_of(1) + list(west2_conn.get_all_load_balancers()).should.have.length_of(1) + + @mock_elb def test_add_listener(): conn = boto.connect_elb()