Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Mocking library focusing on very explicit definition of the mocks' behaviour

Project Description

DO NOT USE THIS LIBRARY: there is now a standard mocking library in Python. I will not fix anything in this library and I’m migrating my own projects to unittest.mock.

MockMockMock is a Python (2.7+ and 3.3+) mocking library focusing on very explicit definition of the mocks’ behaviour. It allows as-specific-as-needed unit-tests as well as more generic ones.

It’s licensed under the MIT license. It’s available on the Python package index, its documentation is hosted by Python and its source code is on GitHub.

Quick start

Install from PyPI:

$ pip install MockMockMock


>>> from MockMockMock import *

Write some code to test:

>>> def f(source):
...   return source.get(42) * 2


>>> mocks = Engine()
>>> mock = mocks.create("mocks")


>>> mock.expect.get(42).and_return(12)


>>> assert f(mock.object) == 24

Verify all expected calls have been done:

>>> mocks.tearDown()
Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
MockMockMock-0.5.3.tar.gz (11.6 kB) Copy SHA256 Checksum SHA256 Source Jun 6, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting