def METHOD_NAME(self, cognite_client: CogniteClient) -> None:
    with pytest.raises(CogniteAPIError) as error:
        cognite_client.data_modeling.spaces.apply(SpaceApply(space="myInvalidSpace", name="wayTooLong" * 255))
    # Assert
    assert error.value.code == 400
    assert "name size must be between 0 and 255" in error.value.message