diff --git a/tests/test_ec2/test_regions.py b/tests/test_ec2/test_regions.py index 3643745e4..a72412f0e 100644 --- a/tests/test_ec2/test_regions.py +++ b/tests/test_ec2/test_regions.py @@ -17,12 +17,12 @@ def test_add_servers_to_a_single_region(): add_servers_to_region('ami-5678efgh', 1, region) conn = boto.ec2.connect_to_region(region) - instances = conn.get_only_instances() - len(instances).should.equal(2) - instances.sort(key=lambda x: x.image_id) + reservations = conn.get_all_instances() + len(reservations).should.equal(2) + reservations.sort(key=lambda x: x.instances[0].image_id) - instances[0].image_id.should.equal('ami-1234abcd') - instances[1].image_id.should.equal('ami-5678efgh') + reservations[0].instances[0].image_id.should.equal('ami-1234abcd') + reservations[1].instances[0].image_id.should.equal('ami-5678efgh') @mock_ec2 @@ -34,14 +34,14 @@ def test_add_servers_to_multiple_regions(): us_conn = boto.ec2.connect_to_region(region1) ap_conn = boto.ec2.connect_to_region(region2) - us_instances = us_conn.get_only_instances() - ap_instances = ap_conn.get_only_instances() + us_reservations = us_conn.get_all_instances() + ap_reservations = ap_conn.get_all_instances() - len(us_instances).should.equal(1) - len(ap_instances).should.equal(1) + len(us_reservations).should.equal(1) + len(ap_reservations).should.equal(1) - us_instances[0].image_id.should.equal('ami-1234abcd') - ap_instances[0].image_id.should.equal('ami-5678efgh') + us_reservations[0].instances[0].image_id.should.equal('ami-1234abcd') + ap_reservations[0].instances[0].image_id.should.equal('ami-5678efgh') @mock_autoscaling