diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-07 19:50:38 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-08 20:14:09 +0100 |
commit | 77380756470bbc2610cb6085db4e477fc7d5acc7 (patch) | |
tree | 5c2cb5efdc65bc5956443dfc720eec9fbac55710 | |
parent | 2ba53cc4e45765f44680c9577d45d139ed3ca645 (diff) |
Allow Set to fail with o.fd.DBus.Error.InvalidArgs
That's what GDBus does for inappropriate types or permissions.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=77144
-rw-r--r-- | tests/twisted/test-location.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/twisted/test-location.py b/tests/twisted/test-location.py index 0f1f29cbc..364c748db 100644 --- a/tests/twisted/test-location.py +++ b/tests/twisted/test-location.py @@ -79,7 +79,8 @@ def test(q, bus, conn, stream): conn.Set (cs.CONN_IFACE_LOCATION, 'LocationAccessControl', bad_access_control, dbus_interface =cs.PROPERTIES_IFACE) except dbus.DBusException, e: - assert e.get_dbus_name() == cs.INVALID_ARGUMENT, e.get_dbus_name() + assert e.get_dbus_name() in (cs.INVALID_ARGUMENT, + 'org.freedesktop.DBus.Error.InvalidArgs'), e.get_dbus_name() else: assert False, "Should have had an error!" @@ -91,7 +92,8 @@ def test(q, bus, conn, stream): conn.Set (cs.CONN_IFACE_LOCATION, 'LocationAccessControl', bad_access_control, dbus_interface =cs.PROPERTIES_IFACE) except dbus.DBusException, e: - assert e.get_dbus_name() == cs.INVALID_ARGUMENT, e.get_dbus_name() + assert e.get_dbus_name() in (cs.INVALID_ARGUMENT, + 'org.freedesktop.DBus.Error.InvalidArgs'), e.get_dbus_name() else: assert False, "Should have had an error!" @@ -106,7 +108,8 @@ def test(q, bus, conn, stream): access_control_types, dbus_interface =cs.PROPERTIES_IFACE) except dbus.DBusException, e: - assert e.get_dbus_name() == cs.PERMISSION_DENIED, e.get_dbus_name() + assert e.get_dbus_name() in (cs.PERMISSION_DENIED, + 'org.freedesktop.DBus.Error.InvalidArgs'), e.get_dbus_name() else: assert False, "Should have had an error!" |