moto/tests/test_ec2/test_availability_zones_and_regions.py

24 lines
638 B
Python
Raw Normal View History

2013-02-23 19:51:19 +00:00
import boto
2013-08-03 21:21:25 +00:00
import sure # noqa
2013-02-23 19:51:19 +00:00
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')