summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGarrett Holmstrom <gholms@fedoraproject.org>2013-06-21 18:14:35 -0700
committerDaniel Lindsley <daniel@toastdriven.com>2013-08-28 12:55:56 -0700
commitffc6cc0d0b464c8297323895a18eb7ef22d97bb7 (patch)
treead7f5ff1c033e2b5809cdbac498fdefd045abb2e /tests
parent8ff4a4bb2b550fbcc8a8b4cc2cd5400e2d200469 (diff)
downloadboto-ffc6cc0d0b464c8297323895a18eb7ef22d97bb7.tar.gz
Start moving get_all_instances to get_all_reservations
get_all_instances doesn't actually get all instances, but rather gets all *reservations*, which themselves contain instances. This commit starts the process of making get_all_instances actually return a list of instances by doing a few things: 1. Rename the current get_all_instances to get_all_reservations. 2. Make get_all_instances a stub that warns and then calls get_all_reservations. 3. Add a new get_only_instances method that will eventually become the new behavior of get_all_instances. People can then transition to get_all_reservations and get_only_instances as appropriate until get_all_instances finally switches over in a future release.
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/ec2/test_cert_verification.py2
-rw-r--r--tests/integration/ec2/vpc/test_connection.py2
-rw-r--r--tests/unit/ec2/test_instance.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/integration/ec2/test_cert_verification.py b/tests/integration/ec2/test_cert_verification.py
index d2428fa0..67880f76 100644
--- a/tests/integration/ec2/test_cert_verification.py
+++ b/tests/integration/ec2/test_cert_verification.py
@@ -37,4 +37,4 @@ class CertVerificationTest(unittest.TestCase):
def test_certs(self):
for region in boto.ec2.regions():
c = region.connect()
- c.get_all_instances()
+ c.get_all_reservations()
diff --git a/tests/integration/ec2/vpc/test_connection.py b/tests/integration/ec2/vpc/test_connection.py
index 59c07343..45fd82f4 100644
--- a/tests/integration/ec2/vpc/test_connection.py
+++ b/tests/integration/ec2/vpc/test_connection.py
@@ -69,7 +69,7 @@ class TestVPCConnection(unittest.TestCase):
time.sleep(10)
instance = reservation.instances[0]
self.addCleanup(self.terminate_instance, instance)
- retrieved = self.api.get_all_instances(instance_ids=[instance.id])
+ retrieved = self.api.get_all_reservations(instance_ids=[instance.id])
self.assertEqual(len(retrieved), 1)
retrieved_instances = retrieved[0].instances
self.assertEqual(len(retrieved_instances), 1)
diff --git a/tests/unit/ec2/test_instance.py b/tests/unit/ec2/test_instance.py
index c48ef114..6ee0f2f2 100644
--- a/tests/unit/ec2/test_instance.py
+++ b/tests/unit/ec2/test_instance.py
@@ -216,7 +216,7 @@ class TestDescribeInstances(AWSMockServiceTestCase):
def test_multiple_private_ip_addresses(self):
self.set_http_response(status_code=200)
- api_response = self.service_connection.get_all_instances()
+ api_response = self.service_connection.get_all_reservations()
self.assertEqual(len(api_response), 1)
instances = api_response[0].instances