'Validate `project_id` is required for ec2.
Test that a SchemaValidationError is raised when type is ec2
and no `project_id` is provided in create request.'

def test_validate_credential_ec2_without_project_id_fails(self):

    request_to_validate = {'blob': 'some    credential    blob', 'type': 'ec2', 'user_id': uuid.uuid4().hex}
    self.assertRaises(exception.SchemaValidationError, self.create_credential_validator.validate, request_to_validate)
