Skip to main content

Fluent interface facade for Michael Foord's mock.

Project description

|Logo| |Build Status|

Fluent interface facade for Michael Foord's Mock. \* Easy and readable
configuration of mock side effects. \* Configuration and verification
using matchers.

A example test using *fluentmock* and hamcrest:

.. raw:: html

<pre><code>from fluentmock import UnitTests, when, verify
from hamcrest import assert_that, equal_to

class SeveralAnswersTests(UnitTests):
def test_should_return_configured_values_in_given_order(self):


assert_that(targetpackage.targetfunction(2), equal_to(1))
assert_that(targetpackage.targetfunction(2), equal_to(2))
assert_that(targetpackage.targetfunction(2), equal_to(3))



- `Comparing Mock and
Fluentmock <>`__
- `Migrating from Mockito to
Fluentmock <>`__


... was to replace mockito with something that is as powerful as Mock.

.. |Logo| image::
.. |Build Status| image::

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
fluentmock-0.2.4-py2.py3-none-any.whl (13.0 kB) Copy SHA256 hash SHA256 Wheel 2.7 Apr 4, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page