This commit is contained in:
Steve Pulec 2013-02-26 00:31:01 -05:00
commit d32059f301
16 changed files with 59 additions and 58 deletions

View file

@ -27,26 +27,26 @@ def test_describe_table():
)
conn = boto.connect_dynamodb('the_key', 'the_secret')
expected = {
'Table': {
'CreationDateTime': 1326499200.0,
'ItemCount': 0,
'KeySchema': {
'HashKeyElement': {
'AttributeName': 'forum_name',
'AttributeType': 'S'
},
'RangeKeyElement': {
'AttributeName': 'subject',
'AttributeType': 'S'
}
},
'ProvisionedThroughput': {
'ReadCapacityUnits': 10,
'WriteCapacityUnits': 10
},
'TableName': 'messages',
'TableSizeBytes': 0,
'TableStatus': 'ACTIVE'
'Table': {
'CreationDateTime': 1326499200.0,
'ItemCount': 0,
'KeySchema': {
'HashKeyElement': {
'AttributeName': 'forum_name',
'AttributeType': 'S'
},
'RangeKeyElement': {
'AttributeName': 'subject',
'AttributeType': 'S'
}
}
},
'ProvisionedThroughput': {
'ReadCapacityUnits': 10,
'WriteCapacityUnits': 10
},
'TableName': 'messages',
'TableSizeBytes': 0,
'TableStatus': 'ACTIVE'
}
}
assert conn.describe_table('messages') == expected

View file

@ -5,4 +5,4 @@ from moto import mock_ec2
@mock_ec2
def test_not_implemented_method():
requests.post.when.called_with("https://ec2.us-east-1.amazonaws.com/",
data={'Action':['foobar']}).should.throw(NotImplementedError)
data={'Action': ['foobar']}).should.throw(NotImplementedError)

View file

@ -10,7 +10,7 @@ def test_create_and_describe_security_group():
conn = boto.connect_ec2('the_key', 'the_secret')
security_group = conn.create_security_group('test security group', 'this is a test security group')
security_group.name.should.equal('test security group')
expect(security_group).name.should.equal('test security group')
security_group.description.should.equal('this is a test security group')
# Trying to create another group with the same name should throw an error
@ -25,7 +25,7 @@ def test_create_and_describe_security_group():
def test_deleting_security_groups():
conn = boto.connect_ec2('the_key', 'the_secret')
security_group1 = conn.create_security_group('test1', 'test1')
security_group2 = conn.create_security_group('test2', 'test2')
conn.create_security_group('test2', 'test2')
conn.get_all_security_groups().should.have.length_of(2)
@ -62,6 +62,7 @@ def test_authorize_ip_range_and_revoke():
security_group = conn.get_all_security_groups()[0]
security_group.rules.should.have.length_of(0)
@mock_ec2
def test_authorize_other_group_and_revoke():
conn = boto.connect_ec2('the_key', 'the_secret')