[tasque/transition: 4/213] Move python test script to tests (part 2)



commit 726b8d169923e31e1efbd1385e9f29f5fd8793f4
Author: Antonius Riha <antoniusriha gmail com>
Date:   Tue May 15 16:18:25 2012 +0200

    Move python test script to tests (part 2)

 tests/create-task.py |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/tests/create-task.py b/tests/create-task.py
new file mode 100755
index 0000000..91bfa77
--- /dev/null
+++ b/tests/create-task.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+import sys, dbus, dbus.glib
+
+#import pdb
+
+# Get the D-Bus Session Bus
+bus = dbus.SessionBus()
+
+#Access the ICEcore Daemon Object
+obj = bus.get_object("org.gnome.Tasque",
+	"/org/gnome/Tasque/RemoteControl")
+
+#Access the remote control interface
+tasque = dbus.Interface(obj, "org.gnome.Tasque.RemoteControl")
+
+for n in tasque.GetCategoryNames():
+	print n
+
+taskId = tasque.CreateTask ("Tasque", "Create a task via DBus", True)
+
+print "taskId: " + taskId



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]