From 4374bd6bece9d868c2a54f29466cd797cb5da812 Mon Sep 17 00:00:00 2001
From: Ivan Tyagov <ivan@nexedi.com>
Date: Fri, 11 Feb 2011 11:55:43 +0000
Subject: [PATCH] Use abstract 'full_text'm scriptable key(this way we can test
 with other search engines easier). Small test fixes.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43286 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5OOo/tests/testDms.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/product/ERP5OOo/tests/testDms.py b/product/ERP5OOo/tests/testDms.py
index cfbb6b192b..10472bcbce 100644
--- a/product/ERP5OOo/tests/testDms.py
+++ b/product/ERP5OOo/tests/testDms.py
@@ -776,7 +776,7 @@ class TestDocument(TestDocumentMixin):
     self.stepTic()
 
     def getAdvancedSearchTextResultList(searchable_text, portal_type=None,src__=0):
-      kw = {'SearchableText': searchable_text}
+      kw = {'full_text': searchable_text}
       if portal_type is not None:
         kw['portal_type'] = portal_type
       if src__==1:
@@ -793,11 +793,11 @@ class TestDocument(TestDocumentMixin):
       getAdvancedSearchTextResultList("Great", ('Person', 'Web Page')))
     # full text search with whole title of a document
     self.assertSameSet([document_3], \
-      getAdvancedSearchTextResultList(document_3.getTitle()))
+      getAdvancedSearchTextResultList(document_3.getTitle(), ('Presentation',)))
     # full text search with reference part of searchable_text 
     # (i.e. not specified with 'reference:' - simply part of search text)
     self.assertSameSet([document_3], \
-      getAdvancedSearchTextResultList(document_3.getReference()))
+      getAdvancedSearchTextResultList(document_3.getReference(), ('Presentation',)))
 
    # full text search with reference
     self.assertSameSet([web_page], \
@@ -831,7 +831,7 @@ class TestDocument(TestDocumentMixin):
     self.assertSameSet([document_1, web_page], \
       getAdvancedSearchTextResultList('language:en'))
     self.assertSameSet([document_1], \
-      getAdvancedSearchTextResultList('Hello language:en'))
+      getAdvancedSearchTextResultList('ScriptableKey language:en'))
     self.assertSameSet([document_2], \
       getAdvancedSearchTextResultList('language:fr'))
     self.assertSameSet([web_page], \
-- 
2.30.9