summaryrefslogtreecommitdiffstats
path: root/python/tests/test-server.py
diff options
context:
space:
mode:
authorSeth Nickell <seth@gnome.org>2004-05-30 05:30:09 +0000
committerSeth Nickell <seth@gnome.org>2004-05-30 05:30:09 +0000
commit26c937cb302506c0f4dd96e2a1dd98535f167696 (patch)
tree8e02bc49599319c3aa62855b68da6ce5b6780f9b /python/tests/test-server.py
parent2e8a06bb8fa49b5b2163450654819fd26593cee4 (diff)
2004-05-30 Seth Nickell <seth@gnome.org>
* python/dbus_bindings.pyx.in: Add support for ObjectPath type. * python/dbus.py: Refactor message handling code to a common function. * python/tests/test-client.py: * python/tests/test-server.py: Add tests that check to make sure values of all types can be echoed from a service w/o mangling.
Diffstat (limited to 'python/tests/test-server.py')
-rw-r--r--python/tests/test-server.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/tests/test-server.py b/python/tests/test-server.py
new file mode 100644
index 00000000..2af685bc
--- /dev/null
+++ b/python/tests/test-server.py
@@ -0,0 +1,17 @@
+import dbus
+import gtk
+
+class TestObject(dbus.Object):
+ def __init__(self, service):
+ method_list = [ self.Echo ]
+ dbus.Object.__init__(self, "/TestObject", method_list, service)
+
+ def Echo(self, variable):
+ return variable
+
+session_bus = dbus.SessionBus()
+
+local_service = dbus.Service("org.designfu.Test", bus=session_bus)
+local_object = TestObject(local_service)
+
+gtk.main()