MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_pastebin_invalid_url

Method test_pastebin_invalid_url

testing/test_pastebin.py:149–155  ·  view source on GitHub ↗
(self, pastebin, mocked_urlopen_invalid)

Source from the content-addressed store, hash-verified

147 return calls
148
149 def test_pastebin_invalid_url(self, pastebin, mocked_urlopen_invalid) -> None:
150 result = pastebin.create_new_paste(b"full-paste-contents")
151 assert (
152 result
153 == "bad response: invalid format ('View <a href=\"/invalid/3c0c6750bd\">raw</a>.')"
154 )
155 assert len(mocked_urlopen_invalid) == 1
156
157 def test_pastebin_http_error(self, pastebin, mocked_urlopen_fail) -> None:
158 result = pastebin.create_new_paste(b"full-paste-contents")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected