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 hashes)
Built Distribution
Close
Hashes for foxmock-0.1.5-py2.py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 088056cfbbed0f3abf6eb6504dc175c5a8b75f3b458b5509b9d0d5935564cd19 |
|
| MD5 | f824d2a1e510d6081c3a4230de5877e7 |
|
| BLAKE2b-256 | 565cb7de578affd737cd1cca47aaba49becdb09e9b4efdd3ac700c500e4ca8c4 |