magpie.mock.network¶
Module Contents¶
Classes¶
Mock object for an |
Functions¶
Return a slug for the given url that can be used as a filename. |
|
Mocked network.http_get() function. |
Data¶
API¶
- magpie.mock.network.CACHE_DIR¶
None
- class magpie.mock.network.MockResponse(text)[source]¶
Mock object for an
httpx.Response.It provides the
textattribute and thejson()method.Initialization
- magpie.mock.network.slugify(url: str)[source]¶
Return a slug for the given url that can be used as a filename.
- magpie.mock.network.http_get(url: str, headers=None) httpx.Response[source]¶
Mocked network.http_get() function.