adding test

pull/2143/head
dgtlmoon 11 months ago
parent 1f9bbef021
commit f57c45f362

@ -78,6 +78,10 @@ def test_headers_in_request(client, live_server):
if (len(app_struct['watching'][uuid]['headers'])):
watches_with_headers += 1
for k, watch in client.application.config.get('DATASTORE').data.get('watching').items():
assert 'werkzeug' in watch.get('remote_server_reply')
assert 'custom' in watch.get('remote_server_reply') # added in util.py, it should append it with a , to the original one
# Should be only one with headers set
assert watches_with_headers==1
res = client.get(url_for("form_delete", uuid="all"), follow_redirects=True)

@ -180,7 +180,11 @@ def live_server_setup(live_server):
for header in request.headers:
output.append("{}:{}".format(str(header[0]), str(header[1])))
return "\n".join(output)
content = "\n".join(output)
resp = make_response(content, 200)
resp.headers['server'] = 'custom'
return resp
# Just return the body in the request
@live_server.app.route('/test-body', methods=['POST', 'GET'])

Loading…
Cancel
Save