From a0bf87d7e397f65a1b6ca856bfc887239cbc3830 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 2 Dec 2020 15:00:09 -0800 Subject: improve Accept-Language header parsing --- tests/test_web.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/test_web.py b/tests/test_web.py index b3e99a1..a5629e0 100644 --- a/tests/test_web.py +++ b/tests/test_web.py @@ -25,6 +25,10 @@ def test_main_view(client: Any) -> None: assert resp.status_code == 200 assert "معلومات عن" in resp.content.decode("utf-8") + resp = client.get("/", headers={"Accept-Language": "zh_Hans_CN"}) + assert resp.status_code == 200 + assert "我们是" in resp.content.decode("utf-8") + def test_basic_api(client: Any) -> None: """ -- cgit v1.2.3