changeset 5006:8e0a95b9508a

Xapian2009: text/wiki mimetype is used in tests.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Fri, 14 Aug 2009 16:34:53 +0200
parents dbec2f99c0dc
children 2df0f9d09669
files MoinMoin/search/_tests/test_search.py
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/search/_tests/test_search.py	Fri Aug 14 00:33:32 2009 +0200
+++ b/MoinMoin/search/_tests/test_search.py	Fri Aug 14 16:34:53 2009 +0200
@@ -202,12 +202,12 @@
         assert not result.hits
 
     def test_mimetype_search_simple(self):
-        result = self.search(u'mimetype:text/text')
-        assert len(result.hits) == 1
+        result = self.search(u'mimetype:text/wiki')
+        assert len(result.hits) == 10
 
     def test_mimetype_search_re(self):
-        result = self.search(ur'mimetype:re:\btext/text\b')
-        assert len(result.hits) == 1
+        result = self.search(ur'mimetype:re:\btext/wiki\b')
+        assert len(result.hits) == 10
 
         result = self.search(ur'category:re:\bCategoryHomepa\b')
         assert not result.hits
@@ -256,6 +256,7 @@
     def test_create_page(self):
         self.pages['TestCreatePage'] = 'some text' # Moin serarch must search this page
         create_page(self.request, 'TestCreatePage', self.pages['TestCreatePage'])
+
         time.sleep(1) # Wait while created pages are being indexed in other thread.
         result = self.search(u'TestCreatePage')
 
@@ -317,7 +318,7 @@
                     u'title:': ([u'', u're:', u'case:', u'case:re:'], u'SearchTestPage'),
                     u'linkto:': ([u'', u're:', u'case:', u'case:re:'], u'FrontPage'),
                     u'category:': ([u'', u're:', u'case:', u'case:re:'], u'CategoryHomepage'),
-                    u'mimetype:': ([u'', u're:'], u'text/text'),
+                    u'mimetype:': ([u'', u're:'], u'text/wiki'),
                     u'language:': ([u''], u'en'),
                     u'domain:': ([u''], u'system')}