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

Method mocked

testing/test_pastebin.py:99–101  ·  view source on GitHub ↗
(url, data)

Source from the content-addressed store, hash-verified

97 import urllib.request
98
99 def mocked(url, data):
100 calls.append((url, data))
101 raise urllib.error.HTTPError(url, 400, "Bad request", {}, io.BytesIO())
102
103 monkeypatch.setattr(urllib.request, "urlopen", mocked)
104 return calls

Callers

nothing calls this directly

Calls 2

DummyFileClass · 0.85
appendMethod · 0.80

Tested by

no test coverage detected