diff options
author | Nisha Yadav <ynisha11@gmail.com> | 2016-08-19 00:41:03 +0530 |
---|---|---|
committer | Nisha Yadav <ynisha11@gmail.com> | 2016-08-19 00:41:03 +0530 |
commit | e63cc7ef6db220f26f4ace87563210c1b7eac2ee (patch) | |
tree | a60004cf34ef5ac81bee84c43c00504ebf4f63e2 | |
parent | 95478c7ebeed3956c7d9b6de2dc41615dfa2c1e2 (diff) | |
download | python-keystoneclient-e63cc7ef6db220f26f4ace87563210c1b7eac2ee.tar.gz |
Follow up patch for Add ec2 functional tests
This patch adds the test_list_ec2 left by the review
I19988661e2d92a3e501a04e2a0e2d773ddcc36e9
Change-Id: Id53fbcb3e82d3bc47babd1129d533dfbc6c13791
-rw-r--r-- | keystoneclient/tests/functional/v3/test_ec2.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/keystoneclient/tests/functional/v3/test_ec2.py b/keystoneclient/tests/functional/v3/test_ec2.py index 6bdc68b..09703b0 100644 --- a/keystoneclient/tests/functional/v3/test_ec2.py +++ b/keystoneclient/tests/functional/v3/test_ec2.py @@ -56,6 +56,28 @@ class EC2TestCase(base.V3ClientTestCase): ec2_ret = self.client.ec2.get(user.id, ec2.access) self.check_ec2(ec2_ret, ec2.ref) + def test_list_ec2(self): + user_one = fixtures.User(self.client, self.project_domain_id) + self.useFixture(user_one) + ec2_one = fixtures.EC2(self.client, user_id=user_one.id, + project_id=self.project_domain_id) + self.useFixture(ec2_one) + + user_two = fixtures.User(self.client, self.project_domain_id) + self.useFixture(user_two) + ec2_two = fixtures.EC2(self.client, user_id=user_two.id, + project_id=self.project_domain_id) + self.useFixture(ec2_two) + + ec2_list = self.client.ec2.list(user_one.id) + + # All ec2 are valid + for ec2 in ec2_list: + self.check_ec2(ec2) + + self.assertIn(ec2_one.entity, ec2_list) + self.assertNotIn(ec2_two.entity, ec2_list) + def test_delete_ec2(self): user = fixtures.User(self.client, self.project_domain_id) self.useFixture(user) |