[tracker/IorR-null-support: 10/12] tests: Add functional test for multiple nulls use-case



commit 55047fc079c3398173a83b27894121e50846d93d
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]