comparison idavoll/test/test_storage.py @ 138:635e433810ef

Actually test whether the item was indeed stored.
author Ralph Meijer <ralphm@ik.nu>
date Mon, 25 Apr 2005 13:02:37 +0000
parents aca904a41a43
children 8f6956b9a688
comparison
equal deleted inserted replaced
137:aca904a41a43 138:635e433810ef
219 self.node.is_subscribed(OWNER)]) 219 self.node.is_subscribed(OWNER)])
220 d.addCallback(cb) 220 d.addCallback(cb)
221 return d 221 return d
222 222
223 def testStoreItems(self): 223 def testStoreItems(self):
224 return self.node.store_items([ITEM_NEW], PUBLISHER) 224 def cb1(void):
225 return self.node.get_items_by_id(['new'])
226
227 def cb2(result):
228 assertEqual(result[0], unicode(ITEM_NEW.toXml(), 'utf-8'))
229
230 d = self.node.store_items([ITEM_NEW], PUBLISHER)
231 d.addCallback(cb1)
232 d.addCallback(cb2)
233 return d
225 234
226 def testStoreUpdatedItems(self): 235 def testStoreUpdatedItems(self):
227 def cb1(void): 236 def cb1(void):
228 return self.node.get_items_by_id(['current']) 237 return self.node.get_items_by_id(['current'])
229 238