[next] telepathy-gabble: Allow Set to fail with o.fd.DBus.Error.InvalidArgs
Simon McVittie
smcv at kemper.freedesktop.org
Tue Apr 8 12:19:54 PDT 2014
Module: telepathy-gabble
Branch: next
Commit: 77380756470bbc2610cb6085db4e477fc7d5acc7
URL: http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=77380756470bbc2610cb6085db4e477fc7d5acc7
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Mon Apr 7 19:50:38 2014 +0100
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
---
tests/twisted/test-location.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/twisted/test-location.py b/tests/twisted/test-location.py
index 0f1f29c..364c748 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!"
More information about the telepathy-commits
mailing list