[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/index/text/tests - test_index.py:1.5

Guido van Rossum guido@python.org
Wed, 4 Dec 2002 15:03:49 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/index/text/tests
In directory cvs.zope.org:/tmp/cvs-serv22335

Modified Files:
	test_index.py 
Log Message:
Add unit tests for isSubscribed().
Clean up some dust from a previous test refactoring.


=== Zope3/lib/python/Zope/App/index/text/tests/test_index.py 1.4 => 1.5 ===
--- Zope3/lib/python/Zope/App/index/text/tests/test_index.py:1.4	Wed Dec  4 09:30:47 2002
+++ Zope3/lib/python/Zope/App/index/text/tests/test_index.py	Wed Dec  4 15:03:48 2002
@@ -116,16 +116,21 @@
         self.assertAbsent(Sheila)
 
     def testBootstrap(self):
+        self.assertEqual(self.index.isSubscribed(), False)
+        self.assertAbsent(Bruce)
+        self.assertAbsent(Sheila)
+
         hub = ObjectHub()
         location = "/bruce"
         traverser = FakeTraverser(self.object, location)
         provideAdapter(None, ITraverser, lambda dummy: traverser)
         hubid = hub.register(location)
         self.index.subscribe(hub)
-        results, total = self.index.query(Bruce)
+        self.assertEqual(self.index.isSubscribed(), True)
         self.assertPresent(Bruce, hubid)
 
         self.index.unsubscribe(hub)
+        self.assertEqual(self.index.isSubscribed(), False)
         self.assertPresent(Bruce, hubid)
 
         self.object.texts = [Sheila]