hurl/integration/tests_ok/patch.py

14 lines
445 B
Python
Raw Normal View History

2020-08-27 10:07:46 +03:00
from flask import request, make_response
from app import app
2020-08-27 10:07:46 +03:00
@app.route("/patch/file.txt", methods=["PATCH"])
2020-08-27 10:07:46 +03:00
def patch():
assert request.headers["Host"] == "www.example.com"
assert request.headers["Content-Type"] == "application/example"
assert request.headers["If-Match"] == '"e0023aa4e"'
2020-08-27 10:07:46 +03:00
resp = make_response()
resp.headers["Content-Location"] = "/file.txt"
resp.headers["ETag"] = '"e0023aa4f"'
2020-08-27 10:07:46 +03:00
return resp, 204