summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-07 19:50:38 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2014-04-07 19:50:38 +0100
commit62f924d05e15ef0793e11368ed4e9745f6253df0 (patch)
tree5c2cb5efdc65bc5956443dfc720eec9fbac55710
parent65fea4674a02c305f2e62f188df67c2f93d018c9 (diff)
Allow Set to fail with o.fd.DBus.Error.InvalidArgsgdbus-properties
That's what GDBus does for inappropriate types or permissions.
-rw-r--r--tests/twisted/test-location.py9
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!"