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:
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: