From 1753e78264343679f2340ec90671e73fcc2c1ec1 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Mon, 8 Mar 2010 11:33:42 +0000 Subject: [PATCH] Test more search cases. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33496 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5OOo/tests/testDms.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/product/ERP5OOo/tests/testDms.py b/product/ERP5OOo/tests/testDms.py index 07652e7bb6..5e3c6d2c86 100644 --- a/product/ERP5OOo/tests/testDms.py +++ b/product/ERP5OOo/tests/testDms.py @@ -754,6 +754,12 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional): description = 'This test make sure that scriptable key feature on ZSQLCatalog works.', language='fr', version = '002') + document_3 = portal.document_module.newContent( + portal_type = 'Presentation', + title = "Complete set of tested reports with a long title.", + version = '003', + language = 'bg', + reference = 'tio-test-doc-3') person = portal.person_module.newContent(portal_type = 'Person', \ reference= "john", title='John Doe Great') @@ -782,6 +788,13 @@ class TestDocument(ERP5TypeTestCase, ZopeTestCase.Functional): getAdvancedSearchTextResultList('make')) self.assertSameSet([web_page, person], \ getAdvancedSearchTextResultList("Great")) + # full text search with whole title of a document + self.assertSameSet([document_3], \ + getAdvancedSearchTextResultList(document_3.getTitle())) + # 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())) # full text search with reference self.assertSameSet([web_page], \ -- 2.30.9