()
| 150 | |
| 151 | |
| 152 | def test_build_environ_encoding() -> None: |
| 153 | scope = { |
| 154 | "type": "http", |
| 155 | "http_version": "1.1", |
| 156 | "method": "GET", |
| 157 | "path": "/小星", |
| 158 | "root_path": "/中国", |
| 159 | "query_string": b"a=123&b=456", |
| 160 | "headers": [], |
| 161 | } |
| 162 | environ = build_environ(scope, b"") |
| 163 | assert environ["SCRIPT_NAME"] == "/中国".encode().decode("latin-1") |
| 164 | assert environ["PATH_INFO"] == "/小星".encode().decode("latin-1") |
nothing calls this directly
no test coverage detected