Python Mock Library

  •        0

Mock object library for Python. This library enables the easy creation and use of Mock objects for Python unit testing. The Mock objects can contain expectations about how they are used, and can validate themselves against the class being mocked.



comments powered by Disqus

Related Projects

Koji - RPM building and tracking system

Koji is an RPM-based build system. Its goal is to provide a flexible, secure, and reproducible way to build software. It is thin, portable command line client, Users can create local buildroots and lot more. It uses Mock to create chroot environments to perform builds.

Pymox - mox: an object-mocking framework for Python

Mox is a mock object framework for Python. Mox is based on EasyMock, a Java mock object framework. Mox will make mock objects for you, so you don't have to create your own! It mocks the public/protected interfaces of Python objects. You set up your mock objects expected behavior using a domain specific language (DSL), which makes it easy to use, understand, and refactor!

Moctep - Mock testing techniques in Python

This project is composed of modules that demonstrate mock testing techniques in Python. Some articles/blog entries related to mock testing techniques: (mocking Web services)

Mock - A Python mock object library

Download the latest release of mock from the PyPI page. For support and discussion, use the Testing in Python mailing list. ( mock is a Python module that provides a core Mock class. It is intended to reduce the need for creating a host of trivial stubs throughout your test suite. After performing an action, you can make assertions about which methods / attributes were used and arguments they were called with. You can also specify return values and set needed at

Pyamof - Yet another mock framework for python

Mock framework for Python, which has taken influence from jMock. InstallingDownload latest version from Downloads and extract the file. Run sudo install. Best way to see the usage is to see the test code Basic usageTo set basic expectation that doSomething must be called: m = yamf.Mock()m.doSomething.mustBeCalledMethod can be mocked also: mockMethod = yamf.MockMethod()mockMethod.mustBeCalledTo verify that the doSomething was called use: m.verify() The verify will raise asse

Mockito-python - Python Test Spy Framework

Mockito-python is a Test Spy Framework based on Java library of the same name. Quick links: Downloads | Tutorial | Bug Tracker | Mailing List | Source Code NewsJuly 26, 2010: Release 0.5.0. Featuring spying on real objects. July 2, 2010: Release 0.4.0. Mockito got in order verifications. Mockito in 15 minutesInstallingInstalling mockito via easy_install is easy, just $ easy_install mockito Proceed to tutorial for other installation options. BasicsImport mockito >>> from mockito import *Creating

Pyfakefs - Fake implementation of Python file system modules for automated developer testing

MotivationMany Python scripts deal with direct file manipulation; testing such code normally requires a ton of testdata files (a real PITA) or lots of mocking using a layer over the raw I/O modules. Even working with a mocking layer might not be desirable considering that mocking every call which does file manipulation in a Python script would be tedious and repetitive. was developed initially as a modest fake implementation of core Python modules to support moderately complex


Behavior Driven Development Framework for Python. PySpec has following specialty. * Many kind of verification methods. * More concrete error messages. * Use decorators to define spec. * Data driven test(@data_provider). * Mock Objects included. * CUI & GUI spec runner(wxPython)

moto - Moto is a library that allows your python tests to easily mock out the boto library

Moto is a library that allows your python tests to easily mock out the boto library

Pypsum - Pypsum is an interface to written in Python

PypsumWhat is it?Pypsum is a program written in the Python programming language that interfaces with (courtesy of James Wilson) to generate Lorem Ipsum text, useful for template designing when lots of mock-up text is needed. Pypsum actually consists of two programs, and Screenshot(s) Getting PypsumPypsum is available only for Linux, at the moment. On Linux, you will need python (I have 2.5.2, might work with other versions, too) with the following modules: url