Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/test_model.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_model.py')
-rw-r--r--tests/test_model.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/test_model.py b/tests/test_model.py
index 87ed94f..145f5d8 100644
--- a/tests/test_model.py
+++ b/tests/test_model.py
@@ -1,5 +1,5 @@
import unittest
-from testutils import tmpData, waitforindex
+from testutils import tmpData
from olpc.datastore import DataStore
from olpc.datastore import model, backingstore
@@ -20,10 +20,9 @@ class Test(unittest.TestCase):
n = n.replace(microsecond=0)
p = model.Property('ctime', n.isoformat(), 'date')
assert p.key == "ctime"
- # XXX: the 'date()' is a work around for a missing secore
- # feature right now
- assert p.value == n.date().isoformat()
-
+ assert p.value == n.isoformat()
+ p.value = p.value
+ assert p.value == n.isoformat()
def test_binaryproperty(self):
ds = DataStore()
@@ -39,11 +38,10 @@ class Test(unittest.TestCase):
data = open('test.jpg', 'r').read()
# binary data with \0's in it can cause dbus errors here
fn = tmpData("with image\0\0 prop")
- # XXX: We should be able to remove:binary now
- uid = ds.create({'title' : "Document 1", 'thumbnail:binary' :
- data, 'ctime:date' : n.isoformat()}, fn)
+ # The key types are looked up in the model now
+ uid = ds.create({'title' : "Document 1", 'thumbnail' : data, 'ctime' : n.isoformat()}, fn)
- waitforindex(ds)
+ ds.complete_indexing()
c = ds.get(uid)
assert c.get_property('thumbnail') == data