def METHOD_NAME(self, pastebin, monkeypatch: MonkeyPatch) -> None:
    import io
    import urllib.request
    def response(url, data):
        stream = io.BytesIO(b"something bad occurred")
        return stream
    monkeypatch.setattr(urllib.request, "urlopen", response)
    result = pastebin.create_new_paste(b"full-paste-contents")
    assert result == "bad response: invalid format ('something bad occurred')"