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

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

Uploaded Source

Built Distribution

systemfixtures-0.5.1-py2.py3-none-any.whl (16.9 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.5.1.tar.gz
Algorithm Hash digest
SHA256 b7edf2d450a4e97a8ec795345ab8114b623863a13539f75fe15cd28b8489b9a2
MD5 b6da116e7dc93eab1907f8b4cde30790
BLAKE2b-256 5de9d7c97ceb5bac809e44f4655866f0115cf52e0c90c315d60668121160ec1e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1e3646722e2cd63968c6e0b5aa5e61c53f97ba4e0819966313eda21d836a6f55
MD5 ab7bbe4fae20e1b3b927f447da970250
BLAKE2b-256 c3826e3f05b64828a39f9ea2c516b2e192c812621becab04675a0a2ef56b5310

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