Mercurial > p > roundup > code
comparison test/db_test_base.py @ 3034:2739e3150e40 maint-0.8
merge from HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 03 Jan 2005 03:24:48 +0000 |
| parents | 0aaf356fd105 |
| children | a7045bad20de |
comparison
equal
deleted
inserted
replaced
| 3032:42f5d0cebcce | 3034:2739e3150e40 |
|---|---|
| 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.55 2004-11-26 00:01:04 richard Exp $ | 18 # $Id: db_test_base.py,v 1.55.2.1 2005-01-03 03:23:38 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 |
| 696 f2 = self.db.file.create(content='world', type="text/frozz", | 696 f2 = self.db.file.create(content='world', type="text/frozz", |
| 697 comment='blah blah') | 697 comment='blah blah') |
| 698 i1 = self.db.issue.create(files=[f1, f2], title="flebble plop") | 698 i1 = self.db.issue.create(files=[f1, f2], title="flebble plop") |
| 699 i2 = self.db.issue.create(title="flebble the frooz") | 699 i2 = self.db.issue.create(title="flebble the frooz") |
| 700 self.db.commit() | 700 self.db.commit() |
| 701 self.assertEquals(self.db.indexer.search([], self.db.issue), {}) | |
| 701 self.assertEquals(self.db.indexer.search(['hello'], self.db.issue), | 702 self.assertEquals(self.db.indexer.search(['hello'], self.db.issue), |
| 702 {i1: {'files': [f1]}}) | 703 {i1: {'files': [f1]}}) |
| 703 self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {}) | 704 self.assertEquals(self.db.indexer.search(['world'], self.db.issue), {}) |
| 704 self.assertEquals(self.db.indexer.search(['frooz'], self.db.issue), | 705 self.assertEquals(self.db.indexer.search(['frooz'], self.db.issue), |
| 705 {i2: {}}) | 706 {i2: {}}) |
