https://github.com/openstack/keystone/blob/master/keystone/tests/test_v3_credential.py#L370
def test_ec2_list_credentials(self):
"""Test ec2 credential listing."""
self._get_ec2_cred_uri()
uri = self._get_ec2_cred_uri()
r = self.get(uri)
cred_list = r.result
self.assertEqual(1, len(cred_list))
According to current code, I think the test steps is:
1. create a ec2 credential
2. list all credentials
3. assert that list method can get the ec2 credential created before
But, the author used a wrong method to create ec2 credential and asserted the wrong data:
1. The method which creates a ec2 credential is self._get_ec2_cred()
2. cred_list should be r.result['credentials']
Fix proposed to branch: master /review. openstack. org/149134
Review: https:/