a socket mock framework - for all kinds of socket animals, web-clients included
BSD-3-CLAUSE License
Bot releases are hidden (Show)
Published by mindflayer over 3 years ago
Fix for #148, thanks to @WisdomPill for opening the issue.
Published by mindflayer over 3 years ago
Thanks to @fvigo mocket
is now able to deal with asyncio.create_connection()
and true non-blocking sockets.
Published by mindflayer almost 4 years ago
Published by mindflayer almost 4 years ago
Thanks to @brycedrennan for underlining it
Published by mindflayer almost 4 years ago
Thanks to @KyleKing for reporting it.
Published by mindflayer about 4 years ago
https://github.com/mindflayer/python-mocket#example-of-how-to-fake-a-socket-errors
@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)
Published by mindflayer about 4 years ago
Thanks to @amotl for #111 and the related test at https://gist.github.com/amotl/015ef6b336db55128798d7f1a9a67dea
Published by mindflayer about 4 years ago
Fix for second sendall
used for delivering request's body.
Thanks to @ajhodges for writing the test which reproduced the issue.
Published by mindflayer about 4 years ago
Now the import line can be written as from mocket.plugins.httpretty import httpretty, httprettified
.
Published by mindflayer about 4 years ago
Thanks to @jonringer for the contribution.
Published by mindflayer about 4 years ago
This version ships the change to support the libmagic
wrapper distributed with file
's command.
With this change, thanks to @felixonmars contribution, Mocket is now available as Arch Linux package: https://www.archlinux.org/packages/community/any/python-mocket/
Published by mindflayer over 4 years ago
Support for tests based on unittest.IsolatedAsyncioTestCase
(Python 3.8
). See:
https://github.com/mindflayer/python-mocket/blob/master/tests/tests38/test_http_aiohttp.py
Thanks to @WisdomPill for the amazing contribution.
Published by mindflayer over 4 years ago
Published by mindflayer over 4 years ago
Published by mindflayer almost 5 years ago
Published by mindflayer almost 5 years ago
Fix for current Redis connection management implementation.
Bump version for Python 3.8.