[tracker] Fixed functional test for fts:rank



commit 30e406e6393371d38c4414d4bd193be20b8db9f7
Author: Ivan Frade <ivan frade nokia com>
Date:   Thu Nov 5 18:14:25 2009 +0200

    Fixed functional test for fts:rank

 tests/functional-tests/03-fts-functions.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/tests/functional-tests/03-fts-functions.py b/tests/functional-tests/03-fts-functions.py
index e5d69c7..632212d 100644
--- a/tests/functional-tests/03-fts-functions.py
+++ b/tests/functional-tests/03-fts-functions.py
@@ -40,8 +40,9 @@ class TestFTSFunctions (unittest.TestCase):
         """
         1. Insert a Contact1 with 'abcdefxyz' as fullname and nickname
         2. Insert a Contact2 with 'abcdefxyz' as fullname
+        2. Insert a Contact3 with 'abcdefxyz' as fullname and twice in nickname
         3. Query sorting by fts:rank
-           EXPECTED: Contact 1 as first result
+           EXPECTED: The 3 contacts in order: 3, 1, 2
         4. Remove the created resources
         """
         insert_sparql = """
@@ -63,7 +64,7 @@ class TestFTSFunctions (unittest.TestCase):
         query = """
         SELECT ?contact WHERE {
            ?contact a nco:PersonContact ;
-                fts:match 'abcdefxyz*' .
+                fts:match 'abcdefxyz' .
         } ORDER BY DESC (fts:rank(?contact))
         """
         results = self.resources.SparqlQuery (query)
@@ -77,9 +78,12 @@ class TestFTSFunctions (unittest.TestCase):
         DELETE {
         <contact://test/fts-function/rank/1> a rdf:Resource .
         <contact://test/fts-function/rank/2> a rdf:Resource .
+        <contact://test/fts-function/rank/3> a rdf:Resource .
         }
         """
 
+    def test_fts_weight (self):
+        pass
         
         
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]