mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-11 02:40:26 +03:00
Add test for charset
This commit is contained in:
parent
152105b9b8
commit
126e10537f
1
integration/tests_ok/charset.exit
Normal file
1
integration/tests_ok/charset.exit
Normal file
@ -0,0 +1 @@
|
||||
0
|
10
integration/tests_ok/charset.hurl
Normal file
10
integration/tests_ok/charset.hurl
Normal file
@ -0,0 +1,10 @@
|
||||
GET http://localhost:8000/charset/default
|
||||
HTTP/1.0 200
|
||||
Content-Type: text/html; charset=utf-8
|
||||
```<p>Hello World!</p>```
|
||||
|
||||
GET http://localhost:8000/charset/uppercase
|
||||
HTTP/1.0 200
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
[Asserts]
|
||||
body == "<p>Hello World!</p>"
|
14
integration/tests_ok/charset.py
Normal file
14
integration/tests_ok/charset.py
Normal file
@ -0,0 +1,14 @@
|
||||
from app import app
|
||||
from flask import request, make_response
|
||||
|
||||
|
||||
@app.route("/charset/default")
|
||||
def charset_default():
|
||||
return "<p>Hello World!</p>"
|
||||
|
||||
|
||||
@app.route("/charset/uppercase")
|
||||
def charset_uppercase():
|
||||
resp = make_response("<p>Hello World!</p>")
|
||||
resp.headers["Content-Type"] = "text/html; charset=UTF-8"
|
||||
return resp
|
Loading…
Reference in New Issue
Block a user