'Create user ec2 credential.'

@decorators.idempotent_id('b580fab9-7ae9-46e8-8138-417260cb6f9f')
def test_create_ec2_credential(self):

    resp = self.non_admin_users_client.create_user_ec2_credential(self.creds.user_id, tenant_id=self.creds.tenant_id)['credential']
    access = resp['access']
    self.addCleanup(self.non_admin_users_client.delete_user_ec2_credential, self.creds.user_id, access)
    self.assertNotEmpty(resp['access'])
    self.assertNotEmpty(resp['secret'])
    self.assertEqual(self.creds.user_id, resp['user_id'])
    self.assertEqual(self.creds.tenant_id, resp['tenant_id'])
