Mocket

Latest version: v3.13.2

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

Scan your dependencies

Page 6 of 14

3.9.36

3.9.35

3.9.4

Thanks to brycedrennan for underlining it

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

Page 6 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.