|
|
Choosing A Webhost: |
CVS: Products/CMFCore/tests - test_CatalogTool.py:1.7.14.2: msg#00070web.zope.cmf.cvs
Update of /cvs-repository/Products/CMFCore/tests In directory cvs.zope.org:/tmp/cvs-serv23703/tests Modified Files: Tag: CMF-1_5-branch test_CatalogTool.py Log Message: Better compatibility with existing range syntax implementation. === Products/CMFCore/tests/test_CatalogTool.py 1.7.14.1 => 1.7.14.2 === --- Products/CMFCore/tests/test_CatalogTool.py:1.7.14.1 Tue Nov 16 17:03:03 2004 +++ Products/CMFCore/tests/test_CatalogTool.py Thu Nov 18 10:54:53 2004 @@ -109,6 +109,12 @@ expires={'query': now-1, 'range': 'max'}))) self.assertEqual(1, len(catalog.searchResults( expires={'query': (now-3, now-1), 'range': 'min:max'}))) + self.assertEqual(1, len(catalog.searchResults( + expires={'query': (now-3, now-1), 'range': 'minmax'}))) + self.assertEqual(1, len(catalog.searchResults( + expires={'query': now-2}))) + self.assertEqual(1, len(catalog.searchResults( + expires={'query': now-2, 'range': None}))) def test_search_restrict_inactive(self): catalog = CatalogTool() @@ -135,6 +141,10 @@ expires={'query': now+3, 'range': 'max'}))) self.assertEqual(0, len(catalog.searchResults( expires={'query': (now-3, now-1), 'range': 'min:max'}))) + self.assertEqual(0, len(catalog.searchResults( + expires={'query': (now-3, now-1), 'range': 'minmax'}))) + self.assertEqual(0, len(catalog.searchResults( + expires={'query': now-2, 'range': None}))) def test_search_restrict_visible(self): catalog = CatalogTool() @@ -161,6 +171,10 @@ effective={'query': now+1, 'range': 'max'}))) self.assertEqual(0, len(catalog.searchResults( effective={'query': (now-1, now+1), 'range': 'min:max'}))) + self.assertEqual(0, len(catalog.searchResults( + effective={'query': (now-1, now+1), 'range': 'minmax'}))) + self.assertEqual(1, len(catalog.searchResults( + expires={'query': now-2, 'range': None}))) self.assertEqual(1, len(catalog.searchResults( effective={'query': now-3, 'range': 'min'}))) @@ -172,6 +186,8 @@ effective={'query': now+3, 'range': 'max'}))) self.assertEqual(1, len(catalog.searchResults( effective={'query': (now-3, now+3), 'range': 'min:max'}))) + self.assertEqual(1, len(catalog.searchResults( + effective={'query': (now-3, now+3), 'range': 'minmax'}))) self.assertEqual(1, len(catalog.searchResults( expires={'query': now-1, 'range': 'min'}))) @@ -183,6 +199,8 @@ expires={'query': now+1, 'range': 'max'}))) self.assertEqual(0, len(catalog.searchResults( expires={'query': (now-1, now+1), 'range': 'min:max'}))) + self.assertEqual(0, len(catalog.searchResults( + expires={'query': (now-1, now+1), 'range': 'minmax'}))) self.assertEqual(1, len(catalog.searchResults( expires={'query': now-3, 'range': 'min'}))) @@ -194,6 +212,8 @@ expires={'query': now+3, 'range': 'max'}))) self.assertEqual(1, len(catalog.searchResults( expires={'query': (now-3, now+3), 'range': 'min:max'}))) + self.assertEqual(1, len(catalog.searchResults( + expires={'query': (now-3, now+3), 'range': 'minmax'}))) self.assertEqual(1, len(catalog.searchResults( effective={'query': now-1, 'range': 'max'},
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | CVS: Products/CMFCore - CatalogTool.py:1.58, Florent Guillaume |
|---|---|
| Next by Date: | CVS: Products/CMFCore - CatalogTool.py:1.55.2.2, Florent Guillaume |
| Previous by Thread: | CVS: Products/CMFCore - CatalogTool.py:1.58, Florent Guillaume |
| Next by Thread: | CVS: Products/CMFCore - CatalogTool.py:1.55.2.2, Florent Guillaume |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |