[Erp5-report] r37152 leonardo - /erp5/trunk/products/ERP5/tests/testInvalidationBug.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jul 16 00:03:47 CEST 2010


Author: leonardo
Date: Fri Jul 16 00:03:46 2010
New Revision: 37152

URL: http://svn.erp5.org?rev=37152&view=rev
Log:
wrap connectors in their portal so the .connect() method actually works

Modified:
    erp5/trunk/products/ERP5/tests/testInvalidationBug.py

Modified: erp5/trunk/products/ERP5/tests/testInvalidationBug.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/tests/testInvalidationBug.py?rev=37152&r1=37151&r2=37152&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/tests/testInvalidationBug.py [utf8] (original)
+++ erp5/trunk/products/ERP5/tests/testInvalidationBug.py [utf8] Fri Jul 16 00:03:46 2010
@@ -54,16 +54,17 @@ class TestInvalidationBug(ERP5TypeTestCa
 
   def testCommitOrder(self):
     """Check order of resources being committed"""
-    module = self.getPortalObject().organisation_module
+    module = self.portal.organisation_module
     organisation = module.newContent()    # modify ZODB and create activity
     organisation.immediateReindexObject() # modify catalog
     path = organisation.getPath()
     test_list = []
     for connection_id, table in (('erp5_sql_connection', 'catalog'),
                                  ('cmf_activity_sql_connection', 'message')):
-      connection = self.portal[connection_id]
-      connection = connection.__class__('_' + connection_id, '',
-                                        '-' + connection.connection_string)
+      conn_class = self.portal[connection_id].__class__
+      conn_string = self.portal[connection_id].connection_string
+      connection = conn_class('_' + connection_id, '',
+                              '-' + conn_string).__of__(self.portal)
       query = "rollback\0select * from %s where path='%s'" % (table, path)
       test_list.append(lambda manage_test=connection.manage_test, query=query:
          len(manage_test(query)))




More information about the Erp5-report mailing list