With this program/Python library you can easily create mock objects on D-Bus. This is useful for writing tests for software which talks to D-Bus services such as upower, systemd, ConsoleKit, gnome-session or others, and it is hard (or impossible without root privileges) to set the state of the real services to what you expect in your tests.
When using a local system/session bus, you can do integration testing without needing root privileges or disturbing a running system. The Python API offers some convenience functions like "start_
You can use this with any programming language, as you can run the mocker as a normal program. The actual setup of the mock (adding objects, methods, properties, etc.) all happen via D-Bus methods on the org.freedesktop
Have a look at the README for more information, examples, and pointers to documentation:
https:/
PyPI page: http://
Ubuntu packages: https:/
View full history Series and milestones
trunk series is the current focus of development.
All code Code
- Version control system:
- Git
- Programming languages:
- Python
All packages Packages in Distributions
-
python-dbusmock source package in Xenial
Version 0.16.3-1 uploaded -
python-dbusmock source package in Trusty
Version 0.10.1-1ubuntu1 uploaded -
python-dbusmock source package in Noble
Version 0.31.1-1 uploaded -
python-dbusmock source package in Mantic
Version 0.29.1-2 uploaded -
python-dbusmock source package in Lunar
Version 0.28.7-1 uploaded
All bugs Latest bugs reported
-
Bug #1696480: python3-dbusmock / test_no_adapters test fails with bluez 5.45
Reported -
Bug #1453815: arbitrary code execution or file overwrite when templates are loaded from /tmp
Reported -
Bug #1424868: not able to run multiple tests in a row
Reported -
Bug #1350833: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer from using spawn_server
Reported -
Bug #1348437: logind template doesn't properly add its properties
Reported