fix test_ec2_list_credentials

The author used a wrong method to create ec2 credential and asserted
the wrong list data:
1. The method which creates a ec2 credential is self._get_ec2_cred()
2. cred_list should be r.result['credentials']

Change-Id: Ibb934ea404654adc99220096edf913a8aa8df7b3
Closes-Bug: #1413459
This commit is contained in:
wanghong 2015-01-22 12:11:57 +08:00
parent c21244f6f8
commit 4ae80da2af
1 changed files with 2 additions and 2 deletions

View File

@ -369,10 +369,10 @@ class TestCredentialEc2(CredentialBaseTestCase):
def test_ec2_list_credentials(self):
"""Test ec2 credential listing."""
self._get_ec2_cred_uri()
self._get_ec2_cred()
uri = self._get_ec2_cred_uri()
r = self.get(uri)
cred_list = r.result
cred_list = r.result['credentials']
self.assertEqual(1, len(cred_list))
def test_ec2_delete_credential(self):