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.4.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

foxmock-0.1.4-py2.py3-none-any.whl (3.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file foxmock-0.1.4.tar.gz.

File metadata

  • Download URL: foxmock-0.1.4.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

Hashes for foxmock-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3cd3dc7e0a1b2920cffc52430f7e0d05c3b9e7e25814e105b336d85c26501450
MD5 5c238f6da396c6fc0c2a90434c7b2929
BLAKE2b-256 5168392ed00a96cc7c2d5882dfc50c2f8682f014c28035930f5cd73e7623dd27

See more details on using hashes here.

File details

Details for the file foxmock-0.1.4-py2.py3-none-any.whl.

File metadata

  • Download URL: foxmock-0.1.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.12

File hashes

Hashes for foxmock-0.1.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9a932f8773f4553cacd2c3de1e574dac75adf3aa946a5372b4eb8f7e905ec949
MD5 61a9fa4bad3184c871304ca41b26fd20
BLAKE2b-256 dbc46cd97563a6cfe238e6a7b30cce7d8cacdd73b7000288b9266d804b9094b7

See more details on using hashes here.

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