Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/basic_api_v2.txt
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2011-01-19 19:25:06 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2011-01-19 19:25:06 (GMT)
commit5496437687c3574c9455f406a8a9caf63dbd621e (patch)
treee0e4ad6f4fadafe7b43b7eec091bbbe88f1d667b /tests/basic_api_v2.txt
parent91dee2f1429d28763a057ec1d18e5ff24984b979 (diff)
parente5b4bd2836911b4d75a2b5be673998710c5c88a0 (diff)
Merge branch 't/testsuite' into refs/top-bases/t/query-typed-props
* t/testsuite: fix breakage introduced by b39d784e1072f8aee2df6b1879d7431a5de83bc0 prepend SL to ticket number pep8 / pylint / style fixes adjust to new filesize and creation_time properties fix From: address
Diffstat (limited to 'tests/basic_api_v2.txt')
-rw-r--r--tests/basic_api_v2.txt11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/basic_api_v2.txt b/tests/basic_api_v2.txt
index d9a38ac..b0c4a88 100644
--- a/tests/basic_api_v2.txt
+++ b/tests/basic_api_v2.txt
@@ -19,9 +19,9 @@ Define some helper functions
Connect to datastore using DBus and wait for it to get ready:
>>> import dbus
->>> DS_DBUS_SERVICE = "org.laptop.sugar.DataStore"
->>> DS_DBUS_INTERFACE = "org.laptop.sugar.DataStore"
->>> DS_DBUS_PATH = "/org/laptop/sugar/DataStore"
+>>> DS_DBUS_SERVICE = 'org.laptop.sugar.DataStore'
+>>> DS_DBUS_INTERFACE = 'org.laptop.sugar.DataStore'
+>>> DS_DBUS_PATH = '/org/laptop/sugar/DataStore'
>>> bus = dbus.SessionBus()
>>> ds = dbus.Interface(bus.get_object(DS_DBUS_SERVICE, DS_DBUS_PATH), DS_DBUS_INTERFACE)
@@ -66,9 +66,8 @@ Change some entries:
Retrieve metadata for a single entry, ignoring variable data:
>>> d=dict(ds.get_properties(o3_uid, byte_arrays=True))
->>> del d['uid'], d['timestamp']
->>> d
-{dbus.String(u'title'): dbus.ByteArray('DS test object 2', variant_level=1), dbus.String(u'mime_type'): dbus.ByteArray('text/html', variant_level=1), dbus.String(u'activity'): dbus.ByteArray('org.sugarlabs.DataStoreTest3', variant_level=1)}
+>>> del d['uid'], d['timestamp'], d['creation_time']
+>>> assert to_native(d) == {u'title': 'DS test object 2', u'mime_type': 'text/html', u'activity': 'org.sugarlabs.DataStoreTest3'}
Find entries using "known" metadata: