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.2.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file foxmock-0.1.2.tar.gz
.
File metadata
- Download URL: foxmock-0.1.2.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33ba9ce4f48a0fd9bb04411cf9df1dd7d1a8d3e978638052335526355959ce6f |
|
MD5 | 9d91cc40537dba01ada01dbe584895a1 |
|
BLAKE2b-256 | 677252eaefdef113ba87b58af176f8e10172fde05d4f08c6c714220eda30ca3f |
File details
Details for the file foxmock-0.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: foxmock-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 3.1 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 | 1480787b4bae93a64618c8f5e138fd463add2f032bc20619d2f8f5e719d14969 |
|
MD5 | 97d2eae96b873e2afcf089b48beb686a |
|
BLAKE2b-256 | ccdc1626ef4ef7f06967b4feea6594c6d4f114a67cc8bb2ced870827be5cf078 |