(self, pastebin, mocked_urlopen_invalid)
| 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") |
nothing calls this directly
no outgoing calls
no test coverage detected