> [1]
>
> + def __init__(self, reservation_id, owner_id, groups=[], instances=[]):
>
> The default empty list values for groups and instances will be
> inadvertently shared by all Reservation instances that don't provide
> explicit values during instantiation. I recommend you use None and
> set the value in the body of the constructor as necessary.
Nice catch! Fixed.
> [2]
>
> + def test_parse_reservation(self):
> + ec2 = client.EC2Client(creds='foo')
> + results = ec2._parse_reservation(sample_describe_instances_result)
> + self.check_parsed_reservations(results)
>
> It would be nice to avoid accessing the private _parse_reservation
> method by passing a query_factory to EC2Client that returns a
> FakeQuery. FakeQuery.submit could return a succeeded deferred and
> you could call ec2.describe_instances to get a Deferred with the
> result you want to make assertions about.
This is interesting. I'm not completely sold on it yet... but I'll create a ticket for this.
> [1]
>
> + def __init__(self, reservation_id, owner_id, groups=[], instances=[]):
>
> The default empty list values for groups and instances will be
> inadvertently shared by all Reservation instances that don't provide
> explicit values during instantiation. I recommend you use None and
> set the value in the body of the constructor as necessary.
Nice catch! Fixed.
> [2] reservation( self): EC2Client( creds=' foo') reservation( sample_ describe_ instances_ result) parsed_ reservations( results) instances to get a Deferred with the
>
> + def test_parse_
> + ec2 = client.
> + results = ec2._parse_
> + self.check_
>
> It would be nice to avoid accessing the private _parse_reservation
> method by passing a query_factory to EC2Client that returns a
> FakeQuery. FakeQuery.submit could return a succeeded deferred and
> you could call ec2.describe_
> result you want to make assertions about.
This is interesting. I'm not completely sold on it yet... but I'll create a ticket for this.