[tracker/IorR-null-support] tests: Add functional test for multiple nulls use-case
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/IorR-null-support] tests: Add functional test for multiple nulls use-case
- Date: Thu, 11 Aug 2011 13:41:28 +0000 (UTC)
commit 3488b576096f925231f3a095482ea295302584c0
Author: Philip Van Hoof <philip codeminded be>
Date: Thu Aug 11 15:41:15 2011 +0200
tests: Add functional test for multiple nulls use-case
tests/functional-tests/01-insertion.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/tests/functional-tests/01-insertion.py b/tests/functional-tests/01-insertion.py
index 9f6607c..1d72d55 100755
--- a/tests/functional-tests/01-insertion.py
+++ b/tests/functional-tests/01-insertion.py
@@ -607,6 +607,15 @@ class TrackerStoreInsertionTests (CommonTrackerStoreTest):
result = self.tracker.query ("""SELECT ?ds WHERE { <test://instance-null> nie:dataSource ?ds }""")
self.assertEquals (len (result), 0)
+ # Multiple nulls
+ self.tracker.update("""INSERT OR REPLACE { <test://instance-null> nie:dataSource null, <test://instance-ds1>, null, <test://instance-ds2>, <test://instance-ds3> }""")
+ result = self.tracker.query ("""SELECT ?ds WHERE { <test://instance-null> nie:dataSource ?ds }""")
+ self.assertEquals (len (result), 2)
+ self.assertEquals (len (result[0]), 1)
+ self.assertEquals (len (result[1]), 1)
+ self.assertEquals (result[0][0], "test://instance-ds2")
+ self.assertEquals (result[1][0], "test://instance-ds3")
+
self.tracker.update ("""DELETE { <test://instance-null> a rdfs:Resource. }""")
self.tracker.update ("""DELETE { <test://instance-ds1> a rdfs:Resource. }""")
self.tracker.update ("""DELETE { <test://instance-ds2> a rdfs:Resource. }""")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]