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.5.tar.gz
(4.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file foxmock-0.1.5.tar.gz.
File metadata
- Download URL: foxmock-0.1.5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dacb46eddb584e2d4cd969a2669b846711dff859c4d548bb492e014e7118127
|
|
| MD5 |
fe0022bfd1d06823ae9c12ec92b4f44f
|
|
| BLAKE2b-256 |
9d1b137ed862da2c41acc04ce10c23859fb9502b7dc2087eccdbd9a0d34d2dd4
|
File details
Details for the file foxmock-0.1.5-py2.py3-none-any.whl.
File metadata
- Download URL: foxmock-0.1.5-py2.py3-none-any.whl
- Upload date:
- Size: 3.3 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 |
088056cfbbed0f3abf6eb6504dc175c5a8b75f3b458b5509b9d0d5935564cd19
|
|
| MD5 |
f824d2a1e510d6081c3a4230de5877e7
|
|
| BLAKE2b-256 |
565cb7de578affd737cd1cca47aaba49becdb09e9b4efdd3ac700c500e4ca8c4
|