Skip to main content

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)

Uploaded Source

Built Distribution

foxmock-0.1.5-py2.py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page