(self)
| 84 | assert r2.headers[b"Content-Type"] == b"application/x-www-form-urlencoded" |
| 85 | |
| 86 | def test_custom_encoding_bytes(self): |
| 87 | data = {b"\xb5 one": b"two", b"price": b"\xa3 100"} |
| 88 | r2 = self.request_class( |
| 89 | "http://www.example.com", formdata=data, encoding="latin1" |
| 90 | ) |
| 91 | assert r2.method == "POST" |
| 92 | assert r2.encoding == "latin1" |
| 93 | self.assertQueryEqual(r2.body, b"price=%A3+100&%B5+one=two") |
| 94 | assert r2.headers[b"Content-Type"] == b"application/x-www-form-urlencoded" |
| 95 | |
| 96 | def test_custom_encoding_textual_data(self): |
| 97 | data = {"price": "£ 100"} |
nothing calls this directly
no test coverage detected