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

Uploaded Source

Built Distribution

systemfixtures-0.4.3-py2.py3-none-any.whl (15.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.4.3.tar.gz
Algorithm Hash digest
SHA256 b292880ed7f901c40582d1e96015b6d9651b261d6ab978520c3ff4d8b614f0e5
MD5 50f0efd1fc896cf44fe4a21159af98b8
BLAKE2b-256 1fc527b3bc1e84e2b0d46cbb2c3d1205628c4048d44f7a873ca743b4eeecafa1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for systemfixtures-0.4.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1dcbe1aecd9159b085954bc6094d97c0ea40e02af996bcca57bd8f98cf66c64d
MD5 db031e0b86362ae7129d013c036b187c
BLAKE2b-256 44a8dbca54a47a4b712e7b166a5c240722623562c3fc8b13c8d7d000026299ba

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