Skip to content

Commit 1ece6c0

Browse files
committed
chore: relax check to not require "charset" for "application/json" content type
Because FastAPI doesn't set "charset" parameter, this change should make the tests pass. RFC 4627 does not define a charset parameter because it requires that JSON is always encoded as Unicode (c) request/request#383 (comment) Part of #13
1 parent 4e22c12 commit 1ece6c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/crud.hurl

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jsonpath "$.counter" == 1
2828
GET {{ SERVER_URL }}/v1/categories/1
2929
HTTP 200
3030
[Asserts]
31-
header "Content-Type" == "application/json; charset=utf-8"
31+
header "Content-Type" contains "application/json"
3232
jsonpath "$.id" == 1
3333
jsonpath "$.name" == "Sport"
3434
jsonpath "$.name_ru" == null
@@ -39,7 +39,7 @@ jsonpath "$.slug" == "sport"
3939
GET {{ SERVER_URL }}/v1/categories
4040
HTTP 200
4141
[Asserts]
42-
header "Content-Type" == "application/json; charset=utf-8"
42+
header "Content-Type" contains "application/json"
4343
jsonpath "$" count == 1
4444
jsonpath "$[0].id" == 1
4545
jsonpath "$[0].name" == "Sport"
@@ -61,7 +61,7 @@ HTTP 204
6161
GET {{ SERVER_URL }}/v1/categories/1
6262
HTTP 200
6363
[Asserts]
64-
header "Content-Type" == "application/json; charset=utf-8"
64+
header "Content-Type" contains "application/json"
6565
jsonpath "$.name" == "Fauna"
6666
jsonpath "$.name_ru" == "Фауна"
6767
jsonpath "$.slug" == "fauna"

0 commit comments

Comments
 (0)