summaryrefslogtreecommitdiff
path: root/test/test-health
diff options
context:
space:
mode:
authorSantiago Carot-Nemesio <sancane@gmail.com>2010-09-10 13:18:11 +0200
committerSantiago Carot-Nemesio <sancane@gmail.com>2010-09-17 16:35:04 +0200
commitea3e77c8a0939d96a7d7ae8425c45e600b192590 (patch)
tree4ec9412d93c2ed3232405c370d6384da3472ee26 /test/test-health
parentbbbdb87fc68ec7a90eee4347fc6d13acca2aae3a (diff)
downloadbluez-ea3e77c8a0939d96a7d7ae8425c45e600b192590.tar.gz
Add simple test for health plugin
Diffstat (limited to 'test/test-health')
-rwxr-xr-xtest/test-health24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/test-health b/test/test-health
new file mode 100755
index 000000000..a89ba9269
--- /dev/null
+++ b/test/test-health
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+import dbus
+import dbus.service
+import gobject
+from dbus.mainloop.glib import DBusGMainLoop
+import sys
+
+DBusGMainLoop(set_as_default=True)
+loop = gobject.MainLoop()
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object("org.bluez", "/org/bluez"),
+ "org.bluez.HealthManager")
+app_path = manager.CreateApplication({"DataType": dbus.types.UInt16(1),
+ "Role": "source"})
+
+print app_path
+print "Push Enter for finishing"
+sys.stdin.readline()
+
+manager.DestroyApplication(app_path)