'Test ec2 credential creation.'

def test_ec2_create_credential(self):

    ec2_cred = self._get_ec2_cred()
    self.assertEqual(self.user_id, ec2_cred['user_id'])
    self.assertEqual(self.project_id, ec2_cred['tenant_id'])
    self.assertIsNone(ec2_cred['trust_id'])
    self._validate_signature(access=ec2_cred['access'], secret=ec2_cred['secret'])
    uri = '/'.join([self._get_ec2_cred_uri(), ec2_cred['access']])
    self.assertThat(ec2_cred['links']['self'], matchers.EndsWith(uri))
