Evaluation & Testing

mocket

A socket mock framework with gevent/asyncio/SSL support for Python.

Status
Generally available
Last checked
Checked · Oct 16, 2026
License
Open source
Pricing
Free tier · from $0

What it is

Mocket is a powerful tool that allows developers to mock network sockets in their Python applications, supporting gevent, asyncio, and SSL. It's essential for testing network interactions without actual network traffic.

Mocket stands out as the only Python library providing robust support for socket mocking with gevent, asyncio, and SSL, making it ideal for comprehensive network testing in Python applications.

When it fits — and when it doesn’t

A good fit for

  • Python developers who need to mock socket operations for testing purposes.

  • Teams working on applications that require extensive network interaction testing.

  • Projects where secure (SSL) socket mocking is necessary for comprehensive testing.

Look elsewhere if

  • Developers looking for a cloud-based service for managing their tests.

  • Projects that do not involve Python or require non-socket-related mocking.

Known weaknesses

Each one links to the public issue, changelog or docs page it came from, where we have one.

  1. 01

    Limited support for non-Python environments

    Mocket is primarily designed and optimized for Python, making it less suitable for multi-language projects.

  2. 02

    Frequent breaking changes between versions

    The transition from v0.1 to v0.2 required significant rewrites of existing test cases due to API changes.

  3. 03

    Complex setup for advanced use-cases

    Setting up Mocket for complex asynchronous testing scenarios with gevent and asyncio can be intricate and error-prone.

What it does well

  • Supports gevent and asyncio for asynchronous testing.

  • SSL support for secure socket mocking.

  • Extensive documentation and community support.

Pricing

Free tier
YesOpen source — free to use
Paid from
$0
Model
Flat rate
Enterprise plan
No

Pricing not independently confirmed — check the vendor’s page.

Performance benchmarks

How Fast Is It?

Set up mocket

Setup steps, common gotchas and what to check after 30 days.

Open the setup guide →