-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add integration test with localized HTTP reason phrase.
- Loading branch information
Showing
7 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
curl 'http://localhost:8000/reason-french' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
* ------------------------------------------------------------------------------ | ||
* Executing entry 1 | ||
* | ||
* Cookie store: | ||
* | ||
* Request: | ||
* GET http://localhost:8000/reason-french | ||
* | ||
* Request can be run with the following curl command: | ||
* curl 'http://localhost:8000/reason-french' | ||
* | ||
> GET /reason-french HTTP/1.1 | ||
> Host: localhost:8000 | ||
> Accept: */* | ||
> User-Agent: hurl/~~~ | ||
> | ||
* Response: (received 7 bytes in ~~~ ms) | ||
* | ||
< HTTP/1.1 200 Succès | ||
< Server: Werkzeug/~~~ Python/~~~ | ||
< Date: ~~~ | ||
< Content-Type: text/html; charset=utf-8 | ||
< Content-Length: 7 | ||
< Server: Flask Server | ||
< Connection: close | ||
< | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This file tests an HTTP endpoint that returns a localized HTTP reason phrase. | ||
# Some HTTP clients doesn't like it, curl does not care. | ||
GET http://localhost:8000/reason-french | ||
HTTP 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Bonjour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Set-StrictMode -Version latest | ||
$ErrorActionPreference = 'Stop' | ||
hurl --verbose tests_ok/reason.hurl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from app import app | ||
|
||
|
||
@app.route("/reason-french") | ||
def reason_french(): | ||
return "Bonjour", "200 Succès" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
set -Eeuo pipefail | ||
hurl --verbose tests_ok/reason.hurl |