[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/DateIndex/tests - test_DateIndex.py:1.1.2.2
Martijn Pieters
mj@zope.com
Wed, 8 May 2002 17:33:52 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/DateIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv21920/DateIndex/tests
Modified Files:
Tag: mj-dateindexes_integration-branch
test_DateIndex.py
Log Message:
- Add license headers
- Integrate better with PluginIndexes package
Tests still fail.
=== Zope/lib/python/Products/PluginIndexes/DateIndex/tests/test_DateIndex.py 1.1.2.1 => 1.1.2.2 ===
+#
+# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE
+#
+##############################################################################
+
import Zope
import unittest
from DateTime import DateTime
-from Products.PluginIndexes.DateIndexes.DateIndex import DateIndex
+from Products.PluginIndexes.DateIndex.DateIndex import DateIndex
class Dummy:
@@ -28,7 +41,7 @@
empty = DateIndex('empty')
- self._assert(empty.getEntryForObject(1234) is None)
+ self.assert_(empty.getEntryForObject(1234) is None)
empty.unindex_object(1234) # shouldn't throw
assert not empty.uniqueValues('foo')
@@ -43,7 +56,7 @@
def test_retrieval( self ):
- work = DateRangeIndex( 'work', 'date' )
+ work = DateIndex( 'work', 'date' )
for i in range( len( dummies ) ):
work.index_object( i, dummies[i] )