hurl/integration/tests_ok/post_xml.py

22 lines
443 B
Python
Raw Normal View History

2020-08-27 10:07:46 +03:00
# coding=utf-8
from flask import request
from app import app
2020-08-27 10:07:46 +03:00
@app.route("/post-xml", methods=["POST"])
2020-08-27 10:07:46 +03:00
def post_xml():
s = request.data.decode("utf-8")
assert (
s
== """<?xml version="1.0"?>
<drink>caf\u00e9</drink>"""
)
return ""
2020-08-27 10:07:46 +03:00
@app.route("/post-xml-no-prolog", methods=["POST"])
2020-08-27 10:07:46 +03:00
def post_xml_no_prolog():
s = request.data.decode("utf-8")
assert s == """<drink>caf\u00e9</drink>"""
return ""