Skip to main content

A simple package to allow dynamic mocking class definition.

Project description

elmock

A simple python package to help dynamic mock class creation. This package is inspired by golang testify/mock tool.

How to use

You juste have to create a class to mock inheriting the elmock.Mock class. Then setup your test case using:

def test_smtg():
    smtg_mock.on('some_method', return_value={'ok': True}, param1=198, some_date=datetime.now())
    some_test.use_smtg_some_method()

Project details


Download files

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

Source Distribution

elmock-0.0.1-2.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

elmock-0.0.1-2-py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page