[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests - testHookedHubEvent.py:1.3 testHubEvent.py:1.2

Barry Warsaw barry@wooz.org
Fri, 20 Dec 2002 14:35:14 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests
In directory cvs.zope.org:/tmp/cvs-serv11652/lib/python/Zope/App/OFS/Services/ObjectHub/tests

Modified Files:
	testHookedHubEvent.py testHubEvent.py 
Log Message:
test module cleanups:

- no docstrings in test methods (convert to comments)
- whitespace normalization
- other minor cleanups


=== Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests/testHookedHubEvent.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests/testHookedHubEvent.py:1.2	Tue Nov 26 14:02:49 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests/testHookedHubEvent.py	Fri Dec 20 14:34:43 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2002 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.
-# 
+#
 ##############################################################################
 """
 
@@ -30,11 +30,11 @@
 from Zope.App.Traversing import getPhysicalPath
 
 from Zope.ComponentArchitecture import getService
-        
+
 class AbstractTestHubEvent(ObjectHubSetup, unittest.TestCase):
-    
+
     klass = None
-    
+
     def setUp(self):
         ObjectHubSetup.setUp(self)
         self.object_hub = getService(self.rootFolder, "ObjectHub")
@@ -45,25 +45,25 @@
                                 self.hubid,
                                 self.location,
                                 self.obj)
-        
+
     def testGetLocation(self):
-        "Test getLocation method"
+        # Test getLocation method
         self.assertEqual(self.event.location, self.location)
-        
+
     def testGetHubId(self):
-        "Test getHubId method"
+        # Test getHubId method
         self.assertEqual(self.event.hubid, self.hubid)
-    
+
     def testGetObject(self):
-        "Test getObject method"
+        # Test getObject method
         self.assertEqual(self.event.object, self.obj)
-    
+
 class TestObjectRegisteredHubEvent(AbstractTestHubEvent):
 
     klass = ObjectRegisteredHubEvent
 
 class TestEmptyObjectRegisteredHubEvent(TestObjectRegisteredHubEvent):
-    
+
     def setUp(self):
         ObjectHubSetup.setUp(self)
         self.object_hub = getService(self.rootFolder, "ObjectHub")
@@ -77,7 +77,7 @@
     klass = ObjectUnregisteredHubEvent
 
 class TestEmptyObjectUnregisteredHubEvent(TestObjectUnregisteredHubEvent):
-    
+
     def setUp(self):
         ObjectHubSetup.setUp(self)
         self.object_hub = getService(self.rootFolder, "ObjectHub")
@@ -91,7 +91,7 @@
     klass = ObjectModifiedHubEvent
 
 class TestEmptyObjectModifiedHubEvent(TestObjectModifiedHubEvent):
-    
+
     def setUp(self):
         ObjectHubSetup.setUp(self)
         self.object_hub = getService(self.rootFolder, "ObjectHub")
@@ -101,9 +101,9 @@
         self.event = self.klass(self.object_hub, self.hubid)
 
 class TestObjectMovedHubEvent(AbstractTestHubEvent):
-    
+
     fromLocation = '/old/location'
-    
+
     def setUp(self):
         ObjectHubSetup.setUp(self)
         self.object_hub = getService(self.rootFolder, "ObjectHub")
@@ -115,15 +115,15 @@
                                 self.fromLocation,
                                 self.location,
                                 self.obj)
-    
+
     def testGetFromLocation(self):
-        "Test from location"
+        # Test from location
         self.assertEqual(self.event.fromLocation, self.fromLocation)
 
     klass = ObjectMovedHubEvent
 
 class TestEmptyObjectMovedHubEvent(TestObjectMovedHubEvent):
-    
+
     def setUp(self):
         ObjectHubSetup.setUp(self)
         self.object_hub = getService(self.rootFolder, "ObjectHub")


=== Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests/testHubEvent.py 1.1 => 1.2 ===
--- Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests/testHubEvent.py:1.1	Tue Oct 29 22:47:48 2002
+++ Zope3/lib/python/Zope/App/OFS/Services/ObjectHub/tests/testHubEvent.py	Fri Dec 20 14:34:43 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 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.
-# 
+#
 ##############################################################################
 """
 
@@ -32,51 +32,51 @@
         self.ruid = ruid
         self.obj = obj
         self.location = location
-    
-    
+
+
     def getObject(self, ruid):
         if ruid==self.ruid:
             return self.obj
-            
+
         raise NotFoundError
-    
+
     def getLocation(self, ruid):
         if ruid==self.ruid:
             return self.location
-            
+
         raise NotFoundError
-        
-        
+
+
 class AbstractTestHubEvent(unittest.TestCase):
-    
+
     location = '/some/location'
     hubid = 23
     obj = object()
     klass = None
-    
+
     def setUp(self):
         self.hub = DummyObjectHub(self.hubid, self.obj, self.location)
         self.event = self.klass(self.hub, self.hubid, self.location, self.obj)
-    
+
     def testGetHub(self):
         self.assertEqual(self.event.hub, self.hub)
-        
+
     def testGetLocation(self):
         self.assertEqual(self.event.location, self.location)
-        
+
     def testGetHubId(self):
-        "Test hubid"
+        # Test hubid
         self.assertEqual(self.event.hubid, self.hubid)
-    
+
     def testGetObject(self):
         self.assertEqual(self.event.object, self.obj)
-    
+
 class TestObjectRegisteredHubEvent(AbstractTestHubEvent):
 
     klass = ObjectRegisteredHubEvent
 
 class TestEmptyObjectRegisteredHubEvent(TestObjectRegisteredHubEvent):
-    
+
     def setUp(self):
         self.hub = DummyObjectHub(self.hubid, self.obj, self.location)
         self.event = self.klass(self.hub, self.hubid)
@@ -86,14 +86,14 @@
     klass = ObjectUnregisteredHubEvent
 
 class TestEmptyObjectUnregisteredHubEvent(unittest.TestCase):
-    
+
     location = '/some/location'
     hubid = 23
     obj = object()
     klass = None
-    
+
     klass = ObjectUnregisteredHubEvent
-    
+
     def testRaisesTypeError(self):
         self.assertRaises(TypeError,
                           self.klass,
@@ -107,15 +107,15 @@
     klass = ObjectModifiedHubEvent
 
 class TestEmptyObjectModifiedHubEvent(TestObjectModifiedHubEvent):
-    
+
     def setUp(self):
         self.hub = DummyObjectHub(self.hubid, self.obj, self.location)
         self.event = self.klass(self.hub, self.hubid)
 
 class TestObjectMovedHubEvent(AbstractTestHubEvent):
-    
+
     fromLocation = '/old/location'
-    
+
     def setUp(self):
         self.hub = DummyObjectHub(self.hubid, self.obj, self.location)
         self.event = self.klass(self.hub,
@@ -123,15 +123,15 @@
                                 self.fromLocation,
                                 self.location,
                                 self.obj)
-    
+
     def testGetFromLocation(self):
-        "Test from location"
+        # Test from location
         self.assertEqual(self.event.fromLocation, self.fromLocation)
 
     klass = ObjectMovedHubEvent
 
 class TestEmptyObjectMovedHubEvent(TestObjectMovedHubEvent):
-    
+
     def setUp(self):
         self.hub = DummyObjectHub(self.hubid, self.obj, self.location)
         self.event = self.klass(self.hub,