summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/python/test-client.py5
-rwxr-xr-xtest/python/test-service.py4
2 files changed, 9 insertions, 0 deletions
diff --git a/test/python/test-client.py b/test/python/test-client.py
index e207d491..ab703502 100755
--- a/test/python/test-client.py
+++ b/test/python/test-client.py
@@ -218,6 +218,11 @@ class TestDBusBindings(unittest.TestCase):
self.assert_(private_type != private_func, '%s should not equal %s' % (private_type, private_func))
self.assert_(private_func != private_cls, '%s should not equal %s' % (private_func, private_cls))
+ def testSenderName(self):
+ print '\n******** Testing sender name keyword ********'
+ myself = self.iface.WhoAmI()
+ print "I am", myself
+
def testBusNameCreation(self):
print '\n******** Testing BusName creation ********'
test = [('org.freedesktop.DBus.Python.TestName', True),
diff --git a/test/python/test-service.py b/test/python/test-service.py
index d5488c44..e8213805 100755
--- a/test/python/test-service.py
+++ b/test/python/test-service.py
@@ -130,6 +130,10 @@ class TestObject(dbus.service.Object, TestInterface):
except Exception, e:
error_cb(e)
+ @dbus.service.method('org.freedesktop.DBus.TestSuiteInterface', in_signature='', out_signature='s', sender_keyword='sender')
+ def WhoAmI(self, sender):
+ return sender
+
session_bus = dbus.SessionBus()
name = dbus.service.BusName("org.freedesktop.DBus.TestSuitePythonService", bus=session_bus)
object = TestObject(name)