Test fixtures for providing fake versions of various system resources (processes, users, groups, etc.)
Project description
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
Release history Release notifications | RSS feed
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.7.tar.gz
(22.1 kB
view details)
File details
Details for the file systemfixtures-0.6.7.tar.gz
.
File metadata
- Download URL: systemfixtures-0.6.7.tar.gz
- Upload date:
- Size: 22.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f9192b4670db3a6950a405dabe013dfca459f2417d6fa017f951013adc9f6b4 |
|
MD5 | a4c7cf32372f905f60013cc2f0f0757b |
|
BLAKE2b-256 | 501d9e7aec732cf0941f2faa2c5e6f385fcc49391256ef740a3c3487394afcac |