hurl/integration/tests_ok/multilines.py

69 lines
1.6 KiB
Python
Raw Normal View History

from app import app
2021-07-01 21:02:47 +03:00
2022-11-15 14:00:29 +03:00
@app.route("/multilines/plain-text")
def multilines_plain_text():
return "line1\nline2\nline3\n"
2022-11-15 14:00:29 +03:00
@app.route("/multilines/base64")
def multilines_base64():
return """\
TG9yZW0gaXBzdW0gZG9sb3Igc2l0IGFtZXQsIGNvbnNlY3RldHVyIGFkaXBpc2NpbmcgZWxpdCwg
c2VkIGRvIGVpdXNtb2QgdGVtcG9yIGluY2lkaWR1bnQgdXQgbGFib3JlIGV0IGRvbG9yZSBtYWdu
YSBhbGlxdWEuIFV0IGVuaW0gYWQgbWluaW0gdmVuaWFtLCBxdWlzIG5vc3RydWQgZXhlcmNpdGF0
aW9uIHVsbGFtY28gbGFib3JpcyBuaXNpIHV0IGFsaXF1aXAgZXggZWEgY29tbW9kbyBjb25zZXF1
YXQuIER1aXMgYXV0ZSBpcnVyZSBkb2xvciBpbiByZXByZWhlbmRlcml0IGluIHZvbHVwdGF0ZSB2
ZWxpdCBlc3NlIGNpbGx1bSBkb2xvcmUgZXUgZnVnaWF0IG51bGxhIHBhcmlhdHVyLiBFeGNlcHRl
dXIgc2ludCBvY2NhZWNhdCBjdXBpZGF0YXQgbm9uIHByb2lkZW50LCBzdW50IGluIGN1bHBhIHF1
aSBvZmZpY2lhIGRlc2VydW50IG1vbGxpdCBhbmltIGlkIGVzdCBsYWJvcnVtLg==
"""
@app.route("/multilines/json")
def multilines_json():
return """\
{
"foo": "bar"
"baz": 123456
}
"""
@app.route("/multilines/hex")
def multilines_hex():
return "039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81\n"
@app.route("/multilines/xml")
def multilines_xml():
return """\
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
</catalog>
"""
@app.route("/multilines/graphql")
def multilines_graphql():
return """\
{
hero {
name
# Queries can have comments!
friends {
name
}
}
}
"""