[Zope-Checkins] CVS: Products/DCOracle2/test - test_zopeda.py:1.1.2.2

Chris Withers chris at simplistix.co.uk
Wed Feb 25 19:41:02 EST 2004


Update of /cvs-repository/Products/DCOracle2/test
In directory cvs.zope.org:/tmp/cvs-serv13760/test

Modified Files:
      Tag: chrisw_fixconnectionleak_branch
	test_zopeda.py 
Log Message:
changes to allow for DA's which may not immediately open connections.


=== Products/DCOracle2/test/test_zopeda.py 1.1.2.1 => 1.1.2.2 ===
--- Products/DCOracle2/test/test_zopeda.py:1.1.2.1	Tue Nov  4 16:47:45 2003
+++ Products/DCOracle2/test/test_zopeda.py	Wed Feb 25 19:41:01 2004
@@ -88,7 +88,7 @@
         
     def test_connected(self):
         self.failIf(self.da.connected())
-        self.da()
+        self.da().query(self.select_sql[0])
         self.failUnless(self.da.connected())
         
     def test_edit(self):
@@ -110,12 +110,13 @@
         # and check paramters have any effect :-S
 
     def test_close_connection(self):
-        self.da()
+        self.da().query(self.select_sql[0])
         self.failUnless(self.da.connected())
         self.da.manage_close_connection(self.REQUEST)
         self.failIf(self.da.connected())
 
     def test_open_connection(self):
+        self.da.manage_close_connection()
         self.failIf(self.da.connected())
         self.da.manage_open_connection(self.REQUEST)
         self.failUnless(self.da.connected())
@@ -123,7 +124,7 @@
     def test_connect(self):
         self.failIf(self.da.connected())
         self.da.connect(self._getConnectionString())
-        self.failUnless(self.da.connected())
+        self.failUnless(self.da._v_connected) # since we may not connect for real...
 
     def test_sql_quote(self):
         self.assertEqual(




More information about the Zope-Checkins mailing list