Mocket

Latest version: v3.13.4

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 14

3.9.3

Thanks to KyleKing for reporting it.

3.9.2

https://github.com/mindflayer/python-mocket#example-of-how-to-fake-a-socket-errors
python
mocketize
def test_raise_exception(self):
url = "http://github.com/fluidicon.png"
Entry.single_register(Entry.GET, url, exception=socket.error())
with self.assertRaises(requests.exceptions.ConnectionError):
requests.get(url)

3.9.1

Thanks to amotl for 111 and the related test at https://gist.github.com/amotl/015ef6b336db55128798d7f1a9a67dea

3.9.0

Fix for second `sendall` used for delivering request's body.

Thanks to ajhodges for writing the test which reproduced the issue.

3.8.9

Now the import line can be written as `from mocket.plugins.httpretty import httpretty, httprettified`.

3.8.8

Thanks to jonringer for the contribution.

Page 7 of 14

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.