summaryrefslogtreecommitdiff
path: root/test/test-client.py
diff options
context:
space:
mode:
authorSimon McVittie <smcv@celebrin.pseudorandom.co.uk>2006-11-14 15:48:47 +0000
committerSimon McVittie <smcv@celebrin.pseudorandom.co.uk>2006-11-14 15:48:47 +0000
commit6008b37253f7a04b563b28a2aa9357de8cfd29d1 (patch)
tree3b8a476032f1d8a8aa6a55c426a37520b5de7cab /test/test-client.py
parent21b10a103d91651d9ac55d2d22832a5df251f45e (diff)
downloaddbus-python-6008b37253f7a04b563b28a2aa9357de8cfd29d1.tar.gz
- dbus.service.Object, dbus.decorators.method: Allow utf8_strings and
byte_arrays parameters kwargs when exporting a method. These change the calling convention in the same way as Message.get_args_list(). - dbus.proxies.ProxyMethod: allow the same kwargs to be passed to any proxy method; this time, they change the representation of the remote method's return value(s). - Test that the above work - Improve correctness of setting the NAME_FLAG_* flags - Whitespace tweaks (remove hard tabs)
Diffstat (limited to 'test/test-client.py')
-rwxr-xr-xtest/test-client.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test-client.py b/test/test-client.py
index 66ad2a3..5c4fba3 100755
--- a/test/test-client.py
+++ b/test/test-client.py
@@ -75,7 +75,17 @@ class TestDBusBindings(unittest.TestCase):
print self.remote_object.Echo("dbus_interface on Proxy test Passed", dbus_interface = "org.freedesktop.DBus.TestSuiteInterface")
print self.iface.Echo("dbus_interface on Interface test Passed", dbus_interface = "org.freedesktop.DBus.TestSuiteInterface")
self.assert_(True)
-
+
+ def testCallingConventionOptions(self):
+ self.assertEquals(self.iface.AcceptListOfByte('\1\2\3'), [1,2,3])
+ self.assertEquals(self.iface.AcceptListOfByte('\1\2\3', byte_arrays=True), '\1\2\3')
+ self.assertEquals(self.iface.AcceptByteArray('\1\2\3'), [1,2,3])
+ self.assertEquals(self.iface.AcceptByteArray('\1\2\3', byte_arrays=True), '\1\2\3')
+ self.assert_(isinstance(self.iface.AcceptUTF8String('abc'), unicode))
+ self.assert_(isinstance(self.iface.AcceptUTF8String('abc', utf8_strings=True), str))
+ self.assert_(isinstance(self.iface.AcceptUnicodeString('abc'), unicode))
+ self.assert_(isinstance(self.iface.AcceptUnicodeString('abc', utf8_strings=True), str))
+
def testIntrospection(self):
#test introspection
print "\n********* Introspection Test ************"