def METHOD_NAME(self):
    res = self.client.post("/api/2/roles/%s" % self.rolex)
    assert res.status_code == 404, res
    role, headers = self.login()
    url = "/api/2/roles/%s" % role.id
    res = self.client.get(url, headers=headers)
    assert res.status_code == 200, res.json
    data = res.json
    data["name"] = "John Doe"
    res = self.client.post(
        url, data=json.dumps(data), headers=headers, content_type="application/json"
    )
    assert res.status_code == 200, res.json
    assert res.json["name"] == data["name"], res.json
    data["name"] = ""
    res = self.client.post(
        url, data=json.dumps(data), headers=headers, content_type="application/json"
    )
    assert res.status_code == 400, res