summaryrefslogtreecommitdiff
path: root/tests/functional-tests
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-01-09 17:45:17 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-01-21 11:42:12 +0000
commit8456f52f4a37b445d9ae82f616d419702ac86179 (patch)
treea45a4c102079c546fecdf1b644ca0a81bd900416 /tests/functional-tests
parentb3fb86ea9cfc7062240aa8527dbc0a9ac897396e (diff)
downloadtracker-8456f52f4a37b445d9ae82f616d419702ac86179.tar.gz
Fix fts:offsets()
Since the fts4 branch was merged, the fts:offsets() function has been broken, because it assumed that properties were stored in the 'fts' table in ID order but this was no longer the case. The property names list is now created on init as static data, but this requires having the 'fulltext_indexed' property available in all cases where previously it has only been available if the ontologies were loaded directly rather than from the GVDB cache. tests/functional-tests/03-fts-functions.py has been improved to test the fts:offsets() function more thoroughly. https://bugzilla.gnome.org/show_bug.cgi?id=721880
Diffstat (limited to 'tests/functional-tests')
-rwxr-xr-xtests/functional-tests/03-fts-functions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/functional-tests/03-fts-functions.py b/tests/functional-tests/03-fts-functions.py
index 07b6af2f5..f9434e6ab 100755
--- a/tests/functional-tests/03-fts-functions.py
+++ b/tests/functional-tests/03-fts-functions.py
@@ -117,9 +117,9 @@ class TestFTSFunctions (CommonTrackerStoreTest):
results = self.tracker.query (query)
self.assertEquals (len(results), 3)
- self.assertEquals (len (results[0][0].split(",")), 4) # (u'151,1,161,1')
- self.assertEquals (len (results[1][0].split(",")), 2) # (u'161,1')
- self.assertEquals (len (results[2][0].split(",")), 6) # (u'151,1,151,2,161,1')
+ self.assertEquals (results[0][0], 'nco:fullname,0,nco:nickname,0')
+ self.assertEquals (results[1][0], 'nco:fullname,0')
+ self.assertEquals (results[2][0], 'nco:fullname,0,nco:nickname,0,nco:nickname,10')
delete_sparql = """
DELETE {