[conduit: 98/138] Make TestDataProvider a little more thorough
- From: John Carr <johncarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [conduit: 98/138] Make TestDataProvider a little more thorough
- Date: Thu, 21 May 2009 03:35:09 -0400 (EDT)
commit e548e21fbef5b29c021549b15ae89df96d292e3e
Author: John Carr <john carr unrouted co uk>
Date: Tue May 5 03:27:57 2009 -0700
Make TestDataProvider a little more thorough
---
test/soup/test_dataprovider.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/test/soup/test_dataprovider.py b/test/soup/test_dataprovider.py
index ee1d2c0..cf558d1 100644
--- a/test/soup/test_dataprovider.py
+++ b/test/soup/test_dataprovider.py
@@ -20,9 +20,12 @@ def make_testcase(wrp):
def test_add(self):
""" Should be able to add items """
self.dp.refresh()
+ count = 0
for obj in self.data.iter_samples():
+ count += 1
self.dp.put(obj, False, None)
self.dp.finish(False, False, False)
+ assert self.wrapper.get_num_items() == count
def test_replace(self):
""" Should be able to replace items """
@@ -42,9 +45,12 @@ def make_testcase(wrp):
rid = self.dp.put(obj, False, None)
self.dp.finish(False, False, False)
+ assert self.wrapper.get_num_items() == 1
+
self.dp.refresh()
self.dp.delete(rid.get_UID())
self.dp.finish(False, False, False)
+ assert self.wrapper.get_num_items() == 0
def test_refresh(self):
""" Refresh shouldnt throw exceptions """
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]