MCPcopy
hub / github.com/scrapy/scrapy / test_decode_utf8

Method test_decode_utf8

tests/test_robotstxt_interface.py:124–127  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

122 assert decoded_content == "User-agent: *\nDisallow: /\n"
123
124 def test_decode_utf8(self):
125 robotstxt_body = b"User-agent: *\nDisallow: /\n"
126 decoded_content = decode_robotstxt(robotstxt_body, spider=None)
127 assert decoded_content == "User-agent: *\nDisallow: /\n"
128
129 def test_decode_non_utf8(self):
130 robotstxt_body = b"User-agent: *\n\xffDisallow: /\n"

Callers

nothing calls this directly

Calls 1

decode_robotstxtFunction · 0.90

Tested by

no test coverage detected