Make strict mocks using a mirror
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mockingmirror-0.2.tar.gz
(7.9 kB
view details)
Built Distribution
File details
Details for the file mockingmirror-0.2.tar.gz
.
File metadata
- Download URL: mockingmirror-0.2.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5de7bb46a726fe0cf6e6d1ad0a863bcb34298400d369a0e49d403b9b4f3f640 |
|
MD5 | 8c48f2ae0449d69e51f2a0b1c531bf03 |
|
BLAKE2b-256 | 420a2b91172827f70beaf726efd913498a9f6588d0304ee8768cac3502c9df8a |
Provenance
File details
Details for the file mockingmirror-0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: mockingmirror-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50e72154fb4d6904bce12ed5645a2440510225cfb420819441e73fad63a0d457 |
|
MD5 | b54aea854eb8ef2b39f26d84b1d9a3ba |
|
BLAKE2b-256 | de700b4523d78efae73921e4aed2776c603e7b4188bd2ec5954ca4880fa8b378 |