[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/tests/functional.py Fixed a bug in the granting of the manager role to the test manager

Jim Fulton jim at zope.com
Fri Aug 27 14:14:52 EDT 2004


Log message for revision 27303:
  Fixed a bug in the granting of the manager role to the test manager
  during base setup.  Also made the wacky FunctionalTestSetup a bit less
  brittle. 
  


Changed:
  U   Zope3/branches/ZopeX3-3.0/src/zope/app/tests/functional.py


-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/tests/functional.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/tests/functional.py	2004-08-27 16:33:17 UTC (rev 27302)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/tests/functional.py	2004-08-27 18:14:52 UTC (rev 27303)
@@ -122,7 +122,13 @@
             self._init = True
 
             # Make a local grant for the test user
+            # TODO, find a better way to make this grant happen.
+            # The way I did this is way too messy, given how
+            # strang FunctionalTestSetup is.  Later, when we
+            # have time, we should clean up this (perhaps with an
+            # event) and clean up FunctionalTestSetup.
             response = http(grant_request, handle_errors=False)
+            FunctionalTestSetup().connection = None
             
         elif config_file and config_file != self._config_file:
             # Running different tests with different configurations is not
@@ -133,9 +139,11 @@
     def setUp(self):
         """Prepares for a functional test case."""
         # Tear down the old demo storage (if any) and create a fresh one
+        abort()
         self.db.close()
         storage = DemoStorage("Demo Storage", self.base_storage)
         self.db = self.app.db = DB(storage)
+        self.connection = None
 
     def tearDown(self):
         """Cleans up after a functional test case."""



More information about the Zope3-Checkins mailing list