Skip to main content

Test fixtures for providing fake versions of various system resources (processes, users, groups, etc.)

Project description

Latest Version Build Status Coverage Documentation Status

A collection of Python fixtures to fake out various system resources (processes, users, groups, etc.).

Each fake resource typically behaves as an “overlay” on the real resource, in that it can be programmed with fake behavior for a set of inputs, but falls back to the real behavior for the rest.

>>> import pwd

>>> from systemfixtures import FakeUsers

>>> users = FakeUsers()
>>> users.setUp()

>>> pwd.getpwnam("foo")
Traceback (most recent call last):
...
KeyError: 'getpwnam(): name not found: foo'

>>> users.add("foo", 123)
>>> info = pwd.getpwnam("foo")
>>> info.pw_uid
123
>>> users.cleanUp()

Support and Documentation

See the online documentation for a complete reference.

Developing and Contributing

See the GitHub project. Bugs can be filed in the issues tracker.

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

systemfixtures-0.6.2.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

systemfixtures-0.6.2-py2.py3-none-any.whl (19.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file systemfixtures-0.6.2.tar.gz.

File metadata

File hashes

Hashes for systemfixtures-0.6.2.tar.gz
Algorithm Hash digest
SHA256 f70c0a1a6e06d773b380d743455909467640f611479cb80109dd8c48a24e2461
MD5 fe752b6ff4c10fa2cecf309dbe1873f8
BLAKE2b-256 f0cfaef8c662f298dc6a7680b13b791683782848a9442fb6e1a8c8020962450d

See more details on using hashes here.

File details

Details for the file systemfixtures-0.6.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for systemfixtures-0.6.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fab663adb29eaafa5ced9e1ecb89a1731bc2e14fa6ce5ae3a9dda9cdd1707543
MD5 c95a5f56a58185881c2db58d527c29cb
BLAKE2b-256 690bb1591edc8ead2a5f932fc7772f299ab803e018f7c8f76c8907ca2d36806b

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