def METHOD_NAME(self) -> None:
    iago = self.example_user("iago")
    payload = {
        "name": "Invalid characters in pygments language",
        "pygments_language": "a$b$c",
        "url_template": "https://template.com{code}",
    }
    resp = self.api_post(iago, "/api/v1/realm/playgrounds", payload)
    self.assert_json_error(resp, "Invalid characters in pygments language")
    payload = {
        "name": "Template with an unexpected variable",
        "pygments_language": "Python",
        "url_template": "https://template.com{?test,code}",
    }
    resp = self.api_post(iago, "/api/v1/realm/playgrounds", payload)
    self.assert_json_error(
        resp, '"code" should be the only variable present in the URL template'
    )
    payload = {
        "name": "Invalid URL template",
        "pygments_language": "Python",
        "url_template": "https://template.com?test={test",
    }
    resp = self.api_post(iago, "/api/v1/realm/playgrounds", payload)
    self.assert_json_error(resp, "Invalid URL template.")
    payload = {
        "name": "Template without the required variable",
        "pygments_language": "Python",
        "url_template": "https://template.com{?test}",
    }
    resp = self.api_post(iago, "/api/v1/realm/playgrounds", payload)
    self.assert_json_error(resp, 'Missing the required variable "code" in the URL template')