'Test creating ec2 credential with invalid blob.
Call ``POST /credentials``.'

def test_create_ec2_credential_with_invalid_blob(self):

    ref = unit.new_credential_ref(user_id=self.user['id'], project_id=self.project_id, blob='{"abc":"def"d}', type=CRED_TYPE_EC2)
    response = self.post('/credentials', body={'credential': ref}, expected_status=http_client.BAD_REQUEST)
    self.assertValidErrorResponse(response)
