[Zope3-checkins] CVS: Zope3/src/zope/app/catalog - tests.py:1.6

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Mar 17 12:59:58 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/catalog
In directory cvs.zope.org:/tmp/cvs-serv19275/src/zope/app/catalog

Modified Files:
	tests.py 
Log Message:


Removed TABs from source code. Resolves issue 186.




=== Zope3/src/zope/app/catalog/tests.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/catalog/tests.py:1.5	Sat Mar 13 18:54:57 2004
+++ Zope3/src/zope/app/catalog/tests.py	Wed Mar 17 12:59:27 2004
@@ -53,15 +53,15 @@
     implements(ISimpleQuery, ISubscriber, ICatalogIndex, IUIFieldCatalogIndex)
 
     def __init__(self, field_name, interface=None):
-	self._field_name = field_name
-	self.interface = interface
-	self._notifies = []
+        self._field_name = field_name
+        self.interface = interface
+        self._notifies = []
 
     def notify(self, event):
-	self._notifies.append(event)
+        self._notifies.append(event)
 
     def clear(self):
-	self._notifies = []
+        self._notifies = []
 
     def _getterms(self):
         d = {}
@@ -83,22 +83,22 @@
 class Test(PlacelessSetup, unittest.TestCase):
 
     def test_catalog_add_del_indexes(self):
-	catalog = Catalog()
-	index = StubIndex('author', None)
-	catalog['author'] = index
-	self.assertEqual(catalog.keys(), ['author'])
-	index = StubIndex('title', None)
-	catalog['title'] = index
-	indexes = catalog.keys()
-	indexes.sort()
-	self.assertEqual(indexes, ['author', 'title'])
-	del catalog['author']
-	self.assertEqual(catalog.keys(), ['title'])
+        catalog = Catalog()
+        index = StubIndex('author', None)
+        catalog['author'] = index
+        self.assertEqual(catalog.keys(), ['author'])
+        index = StubIndex('title', None)
+        catalog['title'] = index
+        indexes = catalog.keys()
+        indexes.sort()
+        self.assertEqual(indexes, ['author', 'title'])
+        del catalog['author']
+        self.assertEqual(catalog.keys(), ['title'])
 
     def test_catalog_notification_passing(self):
-	catalog = Catalog()
-	catalog['author'] = StubIndex('author', None)
-	catalog['title'] = StubIndex('title', None)
+        catalog = Catalog()
+        catalog['author'] = StubIndex('author', None)
+        catalog['title'] = StubIndex('title', None)
         catalog.notify(regEvt(None, None, 'reg1', 1))
         catalog.notify(regEvt(None, None, 'reg2', 2))
         catalog.notify(regEvt(None, None, 'reg3', 3))
@@ -141,8 +141,8 @@
         "test a full refresh"
         self._frob_objecthub()
         catalog = Catalog()
-	catalog['author'] = StubIndex('author', None)
-	catalog['title'] = StubIndex('author', None)
+        catalog['author'] = StubIndex('author', None)
+        catalog['title'] = StubIndex('author', None)
         catalog.updateIndexes()
         for index in catalog.values():
             checkNotifies = index._notifies
@@ -157,8 +157,8 @@
         "test the simple searchresults interface"
         self._frob_objecthub(ints=0)
         catalog = Catalog()
-	catalog['simiantype'] = StubIndex('simiantype', None)
-	catalog['name'] = StubIndex('name', None)
+        catalog['simiantype'] = StubIndex('simiantype', None)
+        catalog['name'] = StubIndex('name', None)
         catalog.updateIndexes()
         res = catalog.searchResults(simiantype='monkey')
         names = [ x.name for x in res ]
@@ -188,4 +188,4 @@
 
 if __name__ == "__main__":
     unittest.main()
-	
+        




More information about the Zope3-Checkins mailing list