def test_equality_operator(self):
        fake_bus = object()
        addr1 = backends.DBusAddress(fake_bus, "conn", "path")

        self.assertThat(addr1,
                        Equals(backends.DBusAddress(fake_bus, "conn", "path")))
        self.assertThat(
            addr1, NotEquals(backends.DBusAddress(fake_bus, "conn",
                                                  "new_path")))
        self.assertThat(
            addr1, NotEquals(backends.DBusAddress(fake_bus, "conn2", "path")))
        self.assertThat(
            addr1, NotEquals(backends.DBusAddress(object(), "conn", "path")))
Beispiel #2
0
def _get_dbus_address_object(connection_name, object_path, bus):
    return backends.DBusAddress(bus, connection_name, object_path)
 def test_can_store_address_in_dictionary(self):
     fake_bus = object()
     backends.DBusAddress(fake_bus, "conn", "path")
     dict(addr=object())
 def test_can_construct(self):
     fake_bus = object()
     backends.DBusAddress(fake_bus, "conn", "path")