Mercurial > p > roundup > code
comparison test/db_test_base.py @ 3033:f8d0fd056ac0
fix indexer searching with no valid words [SF#1086787]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 03 Jan 2005 03:22:22 +0000 |
| parents | 224c7c0b9708 |
| children | d9b4224f955c |
comparison
equal
deleted
inserted
replaced
| 3031:0a81ed2b397d | 3033:f8d0fd056ac0 |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: db_test_base.py,v 1.56 2004-12-16 22:22:55 jlgijsbers Exp $ | 18 # $Id: db_test_base.py,v 1.57 2005-01-03 03:22:22 richard Exp $ |
| 19 | 19 |
| 20 import unittest, os, shutil, errno, imp, sys, time, pprint | 20 import unittest, os, shutil, errno, imp, sys, time, pprint |
| 21 | 21 |
| 22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ | 22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ |
| 23 Interval, DatabaseError, Boolean, Number, Node | 23 Interval, DatabaseError, Boolean, Number, Node |
| 698 f2 = self.db.file.create(content='world', type="text/frozz", | 698 f2 = self.db.file.create(content='world', type="text/frozz", |
| 699 comment='blah blah') | 699 comment='blah blah') |
| 700 i1 = self.db.issue.create(files=[f1, f2], title="flebble plop") | 700 i1 = self.db.issue.create(files=[f1, f2], title="flebble plop") |
| 701 i2 = self.db.issue.create(title="flebble the frooz") | 701 i2 = self.db.issue.create(title="flebble the frooz") |
| 702 self.db.commit() | 702 self.db.commit() |
| 703 self.assertEquals(self.db.indexer.search([], self.db.issue), {}) | |
| 703 self.assertEquals(self.db.indexer.search(['hello'], self.db.issue), | 704 self.assertEquals(self.db.indexer.search(['hello'], self.db.issue), |
| 704 {i1: {'files': [f1]}}) | 705 {i1: {'files': [f1]}}) |
| 705 self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {}) | 706 self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {}) |
| 706 self.assertEquals(self.db.indexer.search(['frooz'], self.db.issue), | 707 self.assertEquals(self.db.indexer.search(['frooz'], self.db.issue), |
| 707 {i2: {}}) | 708 {i2: {}}) |
