hurl/integration/tests/patch.py

15 lines
448 B
Python
Raw Normal View History

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