def METHOD_NAME(self):
    # first, add layout
    self.request.form.update(
        {
            "action": "save",
            "name": "my-layout",
            "global": "false",
            "layout": "<html><body>foobar</body></html>",
        }
    )
    login(self.portal, TEST_USER_NAME)
    setRoles(self.portal, TEST_USER_ID, ["Editor"])
    self.portal.restrictedTraverse("@@manage-layouts-from-editor")()
    layout_resources = queryResourceDirectory(
        CONTENT_LAYOUT_RESOURCE_NAME, "custom"
    )
    user_directory = layout_resources["user-layouts/" + TEST_USER_ID]
    self.assertTrue("my-layout.html" in user_directory.listDirectory())
    # now try to delete user layout
    self.request.form.update(
        {
            "action": "deletelayout",
            "layout": f"custom/user-layouts/{TEST_USER_ID:s}/my-layout.html",  # noqa
        }
    )
    self.portal.restrictedTraverse("@@manage-layouts-from-editor")()
    self.assertTrue("my-layout.html" not in user_directory.listDirectory())