mockingmirror

Make strict mocks using a mirror


Keywords
mock
License
Apache-2.0
Install
pip install mockingmirror==0.2

Documentation

Mocking Mirror

  • Latest Version
  • https://travis-ci.org/NegativeMjark/mockingmirror.svg?branch=master
  • https://img.shields.io/coveralls/NegativeMjark/mockingmirror.svg?branch=master

Make strict mock objects using a mirror:

import mockingmirror

mirror, mock = mockingmirror.mirror()

# Create an object with a method that returns "Hello, World" when called
mirror.myobject.mymethod()[:] = "Hello, World"
assert mock.myobject.mymethod() == "Hello, World"

Install:

pip install mockingmirror