Address boto deprecation warnings (#3616)

This commit eliminates the following warning (of which there are currently dozens):

../boto/ec2/connection.py:582:
  PendingDeprecationWarning: The current get_all_instances implementation will be replaced with get_all_reservations.

`boto` isn't likely to ever make good on this warning, but doing the replacement will
declutter the `moto` test output.
This commit is contained in:
Brian Pandola 2021-01-26 06:07:19 -08:00 committed by GitHub
commit 98d79dca97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 70 additions and 68 deletions

View file

@ -37,7 +37,7 @@ def test_add_servers_to_a_single_region():
add_servers_to_region(EXAMPLE_AMI_ID2, 1, region)
conn = boto.ec2.connect_to_region(region)
reservations = conn.get_all_instances()
reservations = conn.get_all_reservations()
len(reservations).should.equal(2)
image_ids = [r.instances[0].image_id for r in reservations]
@ -53,8 +53,8 @@ def test_add_servers_to_multiple_regions():
us_conn = boto.ec2.connect_to_region(region1)
ap_conn = boto.ec2.connect_to_region(region2)
us_reservations = us_conn.get_all_instances()
ap_reservations = ap_conn.get_all_instances()
us_reservations = us_conn.get_all_reservations()
ap_reservations = ap_conn.get_all_reservations()
len(us_reservations).should.equal(1)
len(ap_reservations).should.equal(1)