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

Uploaded Source

Built Distribution

systemfixtures-0.6.5-py2.py3-none-any.whl (19.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.6.5.tar.gz
Algorithm Hash digest
SHA256 89508b472c1d831e5d756fa3412b1462a7a472e2de221d89c3d0e44dc85ad225
MD5 9e1065457983f0e0bf743284fa81b2fc
BLAKE2b-256 88470987631cafcc517753abd21193f4c24be2ff5a813a1d7e942848bb994aab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.6.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3c0c3765eebe06884c09ea3ca1ffa6e1a241d33eb4ef55e514c192a68181f6fa
MD5 198912793330e679b482645a740dcabd
BLAKE2b-256 e526ab4e449a15bf3f9cfab73ba7b8830b697bea98b9ea0bb8a0e27f980d6f94

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