Mercurial > p > roundup > code
comparison test/db_test_base.py @ 3035:94053f8666c6 maint-0.7
merge from HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 03 Jan 2005 03:24:48 +0000 |
| parents | 7922e1244911 |
| children | d3a5e382d44a |
comparison
equal
deleted
inserted
replaced
| 3029:145cd31e258b | 3035:94053f8666c6 |
|---|---|
| 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.27.2.13 2004-11-26 00:00:32 richard Exp $ | 18 # $Id: db_test_base.py,v 1.27.2.14 2005-01-03 03:24:48 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 |
| 654 f2 = self.db.file.create(content='world', type="text/frozz", | 654 f2 = self.db.file.create(content='world', type="text/frozz", |
| 655 comment='blah blah') | 655 comment='blah blah') |
| 656 i1 = self.db.issue.create(files=[f1, f2], title="flebble plop") | 656 i1 = self.db.issue.create(files=[f1, f2], title="flebble plop") |
| 657 i2 = self.db.issue.create(title="flebble the frooz") | 657 i2 = self.db.issue.create(title="flebble the frooz") |
| 658 self.db.commit() | 658 self.db.commit() |
| 659 self.assertEquals(self.db.indexer.search([], self.db.issue), {}) | |
| 659 self.assertEquals(self.db.indexer.search(['hello'], self.db.issue), | 660 self.assertEquals(self.db.indexer.search(['hello'], self.db.issue), |
| 660 {i1: {'files': [f1]}}) | 661 {i1: {'files': [f1]}}) |
| 661 self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {}) | 662 self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {}) |
| 662 self.assertEquals(self.db.indexer.search(['frooz'], self.db.issue), | 663 self.assertEquals(self.db.indexer.search(['frooz'], self.db.issue), |
| 663 {i2: {}}) | 664 {i2: {}}) |
