[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/tests/functional.py Merged from ZopeX3-3.0 branch:

Jim Fulton jim at zope.com
Fri Aug 27 17:25:31 EDT 2004


Log message for revision 27313:
  Merged from ZopeX3-3.0 branch:
  
    r27303 | jim | 2004-08-27 14:14:52 -0400 (Fri, 27 Aug 2004) | 4 lines
  
  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/trunk/src/zope/app/tests/functional.py


-=-
Modified: Zope3/trunk/src/zope/app/tests/functional.py
===================================================================
--- Zope3/trunk/src/zope/app/tests/functional.py	2004-08-27 21:24:21 UTC (rev 27312)
+++ Zope3/trunk/src/zope/app/tests/functional.py	2004-08-27 21:25:31 UTC (rev 27313)
@@ -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