Test fixtures for providing fake versions of various system resources (processes, users, groups, etc.)
Project description
Example
Please see the full documentation for more information.
>>> 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()
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.4.1.tar.gz
(16.2 kB
view hashes)