A simple and flixible mock library for python
Project description
foxmock
a mock library for python, It's simple and flixible
from foxmock import Mock
obj = Mock()
obj.call("get").ret("12345")
obj.index("age").ret(32)
token = obj.get()
assert token == "12345"
assert obj["age"] == 32
or you can inherit from Mock
from foxmock import Mock
class DynamicToken(Mock):
def __init__(self):
self.call("get").ret("12345")
self.index("age").ret(32)
token = obj.get()
assert token == "12345"
assert obj["age"] == 32
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
foxmock-0.1.0.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file foxmock-0.1.0.tar.gz
.
File metadata
- Download URL: foxmock-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49d6bdd15aec76563b849d41027ff89430bb50746f574bb5748fa73936975b5a |
|
MD5 | 0056f214de512d5359183034207076d3 |
|
BLAKE2b-256 | d66e73de040866b493ce6879ef88d1cc9c97ceb317ef8677c57aca998f1ae0e3 |
File details
Details for the file foxmock-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: foxmock-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a31e503c00f654519cf8129ce9da5e015239bca074b05cad5761b057dddad6be |
|
MD5 | 0b37b86fc1bcc63aada0002493f440e2 |
|
BLAKE2b-256 | 045f34d719b57bbe7fc74ee746d1aec464b213078c664e141629beaebb253c64 |