MCPcopy
hub / github.com/scrapy/scrapy / test_default_encoding_bytes

Method test_default_encoding_bytes

tests/test_http_request_form.py:59–66  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

57 assert fs[b"b"] == [b"2"]
58
59 def test_default_encoding_bytes(self):
60 # using default encoding (utf-8)
61 data = {b"one": b"two", b"price": b"\xc2\xa3 100"}
62 r2 = self.request_class("http://www.example.com", formdata=data)
63 assert r2.method == "POST"
64 assert r2.encoding == "utf-8"
65 self.assertQueryEqual(r2.body, b"price=%C2%A3+100&one=two")
66 assert r2.headers[b"Content-Type"] == b"application/x-www-form-urlencoded"
67
68 def test_default_encoding_textual_data(self):
69 # using default encoding (utf-8)

Callers

nothing calls this directly

Calls 1

assertQueryEqualMethod · 0.95

Tested by

no test coverage detected