def METHOD_NAME():
    """Ensure parent folder parameter is handled correctly."""
    from sasctl.core import RestObj
    FOLDER_NAME = "Spam"
    # Mock response when retrieving parent folder.
    PARENT_FOLDER = RestObj(
        {
            "name": "",
            "id": "123",
            "links": [{"rel": "self", "uri": "/folders/somewhere/spam-eggs-spam-spam"}],
        }
    )
    with mock.patch(
        "sasctl._services.folders.Folders.get_folder", return_value=PARENT_FOLDER
    ):
        with mock.patch("sasctl._services.folders.Folders.post") as post:
            folders.create_folder(FOLDER_NAME, parent="Doesnt Matter")
    # Should have tried to create folder with correct name and parent URI
    assert post.called
    json = post.call_args[1]["json"]
    params = post.call_args[1]["params"]
    assert json["name"] == FOLDER_NAME
    assert json["description"] is None
    assert params["parentFolderUri"] == PARENT_FOLDER["links"][0]["uri"]
    # If parent folder can't be found, error should be raised
    with mock.patch("sasctl._services.folders.Folders.get_folder", return_value=None):
        with mock.patch("sasctl._services.folders.Folders.post"):
            with pytest.raises(ValueError):
                folders.create_folder(FOLDER_NAME, parent="Doesnt Matter")