~tribaal/txaws/xss-hardening

« back to all changes in this revision

Viewing changes to txaws/ec2/tests/test_model.py

Merged 921421-completemultipart [r=oubiwann][f=921421]

This branch adds Complete Multipart method to s3 client.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
class SecurityGroupTestCase(TXAWSTestCase):
9
9
 
10
10
    def test_creation_defaults(self):
11
 
        group = model.SecurityGroup("sg-a3f2", "name", "desc")
12
 
        self.assertEquals(group.id, "sg-a3f2")
 
11
        group = model.SecurityGroup("name", "desc")
13
12
        self.assertEquals(group.name, "name")
14
13
        self.assertEquals(group.description, "desc")
15
14
        self.assertEquals(group.owner_id, "")
19
18
    def test_creation_all_parameters(self):
20
19
        user = "somegal24"
21
20
        other_groups = [
22
 
            model.SecurityGroup("sg-other1", "other1", "another group 1"),
23
 
            model.SecurityGroup("sg-other2", "other2", "another group 2")]
 
21
            model.SecurityGroup("other1", "another group 1"),
 
22
            model.SecurityGroup("other2", "another group 2")]
24
23
        user_group_pairs = [
25
24
            model.UserIDGroupPair(user, other_groups[0].name),
26
25
            model.UserIDGroupPair(user, other_groups[1].name)]
27
26
        ips = [model.IPPermission("tcp", "80", "80", "10.0.1.0/24")]
28
27
        group = model.SecurityGroup(
29
 
            "id", "name", "desc", owner_id="me", groups=user_group_pairs, ips=ips)
30
 
        self.assertEquals(group.id, "id")
 
28
            "name", "desc", owner_id="me", groups=user_group_pairs, ips=ips)
31
29
        self.assertEquals(group.name, "name")
32
30
        self.assertEquals(group.description, "desc")
33
31
        self.assertEquals(group.owner_id, "me")