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
Built Distribution
File details
Details for the file systemfixtures-0.6.3.tar.gz
.
File metadata
- Download URL: systemfixtures-0.6.3.tar.gz
- Upload date:
- Size: 21.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c2940dad1acfcbda667c18410ce8872e84414a8830b46caab6969c8bf848a6e |
|
MD5 | e5c997f43fd3f6fd81150e8a2407e032 |
|
BLAKE2b-256 | 7be436e0c768182e38529dd484b3ee15d64487cbcac0eb3ff48a2c18410eb0b0 |
File details
Details for the file systemfixtures-0.6.3-py2.py3-none-any.whl
.
File metadata
- Download URL: systemfixtures-0.6.3-py2.py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c997f4f87667faf3571aa3550d9b4a00a07fcd14a738ab48441924deec4e1ff4 |
|
MD5 | a61d5ca28b25bcd47b05835c5d691c3b |
|
BLAKE2b-256 | 681b8d26ca16e246805c79b0f8c709a05b58cabbde4377348ab5e84ee56dad06 |