[Zope-CVS] CVS: Products/AdaptableStorage/gateway_sql/tests - testZope2SQL.py:1.2

Shane Hathaway shane@zope.com
Tue, 10 Dec 2002 17:27:02 -0500


Update of /cvs-repository/Products/AdaptableStorage/gateway_sql/tests
In directory cvs.zope.org:/tmp/cvs-serv26118/gateway_sql/tests

Modified Files:
	testZope2SQL.py 
Log Message:
With a few corrections and duct tape, all tests pass.  Woohoo!


=== Products/AdaptableStorage/gateway_sql/tests/testZope2SQL.py 1.1 => 1.2 ===
--- Products/AdaptableStorage/gateway_sql/tests/testZope2SQL.py:1.1	Tue Dec 10 15:37:52 2002
+++ Products/AdaptableStorage/gateway_sql/tests/testZope2SQL.py	Tue Dec 10 17:27:00 2002
@@ -59,13 +59,16 @@
         db = ASDB(storage, resource)
         self.db = db
 
+    def clear(self):
+        for gw in self.gws:
+            if hasattr(gw, 'clear'):
+                gw.clear()
+                self.conn.db.commit()
+
     def tearDown(self):
+        if 1:
+            self.clear()
         self.db.close()
-        # Drop the tables
-        for gw in self.gws:
-            if hasattr(gw, 'drop'):
-                gw.drop()
-        conn.commit()
 
     def testLoad(self):
         conn = self.db.open()