add basic zone and region endpoints
This commit is contained in:
parent
351aca3c68
commit
fbd9206f23
6 changed files with 112 additions and 25 deletions
23
tests/test_ec2/test_availability_zones_and_regions.py
Normal file
23
tests/test_ec2/test_availability_zones_and_regions.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import boto
|
||||
from sure import expect
|
||||
|
||||
from moto import mock_ec2
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_describe_regions():
|
||||
conn = boto.connect_ec2('the_key', 'the_secret')
|
||||
regions = conn.get_all_regions()
|
||||
regions.should.have.length_of(8)
|
||||
regions[0].name.should.equal('eu-west-1')
|
||||
regions[0].endpoint.should.equal('ec2.eu-west-1.amazonaws.com')
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_availability_zones():
|
||||
# Just testing us-east-1 for now
|
||||
conn = boto.connect_ec2('the_key', 'the_secret')
|
||||
zones = conn.get_all_zones()
|
||||
zones.should.have.length_of(5)
|
||||
zones[0].name.should.equal('us-east-1a')
|
||||
zones[0].region_name.should.equal('us-east-1')
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
import boto
|
||||
from sure import expect
|
||||
|
||||
from moto import mock_ec2
|
||||
|
||||
|
||||
@mock_ec2
|
||||
def test_availability_zonesand_regions():
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue