Skip to content
Sections
>> Trisquel >> 软件包 >> etiona >> python >> python-dbusmock
etiona  ]
[ 源代码: python-dbusmock  ]

软件包: python-dbusmock (0.17.1-1)

mock D-Bus objects for tests (Python 2)

With python-dbusmock 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.

Mock objects look like the real API (or at least the parts that you actually need), but they do not actually do anything (or only some action that you specify yourself). You can configure their state, behaviour and responses as you like in your test, without making any assumptions about the real system status.

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.DBus.Mock interface. You just don't have the convenience D-Bus launch API that way.

其他与 python-dbusmock 有关的软件包

  • 依赖
  • 推荐
  • 建议
  • dep: dbus
    simple interprocess messaging system (daemon and utilities)
  • dep: gir1.2-glib-2.0 (>= 1.32)
    Introspection data for GLib, GObject, Gio and GModule
  • dep: python
    interactive high-level object-oriented language (default version)
  • dep: python-dbus
    simple interprocess messaging system (Python interface)
  • dep: python-gi
    Python 2.x bindings for gobject-introspection libraries

下载 python-dbusmock

下载可用于所有硬件架构的
硬件架构 软件包大小 安装后大小 文件
all 55.0 kB349 kB [文件列表]