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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.5.0.tar.gz
Algorithm Hash digest
SHA256 78e706544a0043049ad5c6899f14ff27ae577390f198907cc04b0f7aad4b28ee
MD5 961eae61d43964d0196349e701b7ee0a
BLAKE2b-256 832028106fde325317e7e00b3a691684c6f179b4ad283bd3cb645c55961dbb79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6d8e45d0e19687cdee331bb6c9447fd110d7fb07bbce916a4c5d4988a6b17930
MD5 5aeb97dd41f9d72ebdb3eada26a85bd7
BLAKE2b-256 79c27e95cc38c34e00dea178fd7827ac497dedd8d8c8a096835bb446f4981a86

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