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

Uploaded Source

Built Distribution

systemfixtures-0.6.0-py2.py3-none-any.whl (18.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.6.0.tar.gz
Algorithm Hash digest
SHA256 3c92fcad54f4396d02522a58a55bbd532fca567b56cfdb5a9e44686d077edc4a
MD5 197ddfa8a0650a4949f10f9fa0313047
BLAKE2b-256 ff5820bdeda1c51a39d1119b4d01d944cdea0611a519cce46b5d1436c3ae5ee9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8034210742f76d3182bb90311b1bdaac0e267acd4001c0b8d19661dbd53a73fb
MD5 eb306a82d419438eb1ed02f4555d2f2e
BLAKE2b-256 ac4bcd7e2afbdc409ef846d75b52a85ac1e5233757827a72b5f1c519a760377c

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