define setup_networking_deprecated() method to create supporting
resources for tests that use deprecated methods
This commit is contained in:
parent
fe1293ee5b
commit
144611ff99
4 changed files with 26 additions and 16 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import boto
|
||||
import boto3
|
||||
from moto import mock_ec2
|
||||
from moto import mock_ec2, mock_ec2_deprecated
|
||||
|
||||
|
||||
@mock_ec2
|
||||
|
|
@ -15,3 +16,12 @@ def setup_networking():
|
|||
CidrBlock='10.11.2.0/24',
|
||||
AvailabilityZone='us-east-1b')
|
||||
return {'vpc': vpc.id, 'subnet1': subnet1.id, 'subnet2': subnet2.id}
|
||||
|
||||
@mock_ec2_deprecated
|
||||
def setup_networking_deprecated():
|
||||
conn = boto.connect_vpc()
|
||||
vpc = conn.create_vpc("10.11.0.0/16")
|
||||
subnet1 = conn.create_subnet(vpc.id, "10.11.1.0/24")
|
||||
subnet2 = conn.create_subnet(vpc.id, "10.11.2.0/24")
|
||||
return {'vpc': vpc.id, 'subnet1': subnet1.id, 'subnet2': subnet2.id}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue