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

Uploaded Source

Built Distribution

foxmock-0.1.1-py2.py3-none-any.whl (2.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: foxmock-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 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.1.tar.gz
Algorithm Hash digest
SHA256 fbf3df6fd35283ea4cf96ef1f2fb6975da454152d4a52dcb9fc763058dbc6494
MD5 b3eee34f9abe57b6b8cec24635be5bee
BLAKE2b-256 24f935196be775548319d4779b24c8013d21d85e8bef86ec6dc56623e7f6e285

See more details on using hashes here.

File details

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

File metadata

  • Download URL: foxmock-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.8 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.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6ba788579115acfb5b866febc1f8d88e692c87e93f7f15cfd460ffbac51b8f7d
MD5 e92c9de9fb4f6154ca71abb9f04171d6
BLAKE2b-256 c4b2eb06bedf2a0cee7030cfc02f13c99e2d7747d7c758f951d53d4247b6c8f7

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