[Zope-Checkins] SVN: Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py more test cleanup

Hanno Schlichting hannosch at hannosch.eu
Sun Aug 1 08:30:29 EDT 2010


Log message for revision 115319:
  more test cleanup
  

Changed:
  U   Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py

-=-
Modified: Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py
===================================================================
--- Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py	2010-08-01 12:29:02 UTC (rev 115318)
+++ Zope/trunk/src/Products/ZCatalog/tests/test_zcatalog.py	2010-08-01 12:30:28 UTC (rev 115319)
@@ -10,7 +10,7 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-""" Unittests for Catalog.
+""" Unittests for ZCatalog
 """
 
 import unittest
@@ -61,7 +61,6 @@
     def __nonzero__(self):
         return False
 
-# make objects with failing __len__ and __nonzero__
 
 class dummyLenFail(zdummy):
 
@@ -103,6 +102,20 @@
         return result
 
 
+class PickySecurityManager:
+
+    def __init__(self, badnames=[]):
+        self.badnames = badnames
+
+    def validateValue(self, value):
+        return 1
+
+    def validate(self, accessed, container, name, value):
+        if name not in self.badnames:
+            return 1
+        raise Unauthorized(name)
+
+
 class TestZCatalog(unittest.TestCase):
 
     def setUp(self):
@@ -228,20 +241,6 @@
         self.assertEquals(catalog.getobject(rid0), None)
 
 
-class PickySecurityManager:
-
-    def __init__(self, badnames=[]):
-        self.badnames = badnames
-
-    def validateValue(self, value):
-        return 1
-
-    def validate(self, accessed, container, name, value):
-        if name not in self.badnames:
-            return 1
-        raise Unauthorized(name)
-
-
 class TestZCatalogGetObject(unittest.TestCase):
     # Test what objects are returned by brain.getObject()
 



More information about the Zope-Checkins mailing list