[test] update test to avoid failure
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 06 Jun 2011 17:44:43 +0200
changeset 7463 a7daba4046db
parent 7462 fbfde96437ad
child 7464 9f116f9b3be8
[test] update test to avoid failure
sobjects/test/unittest_parsers.py
--- a/sobjects/test/unittest_parsers.py	Mon Jun 06 16:33:21 2011 +0200
+++ b/sobjects/test/unittest_parsers.py	Mon Jun 06 17:44:43 2011 +0200
@@ -156,11 +156,13 @@
         self.assertEqual(tag.cwuri, 'http://testing.fr/cubicweb/%s' % tag.eid)
         self.assertEqual(tag.cw_source[0].name, 'system')
 
+        session.set_cnxset()
         stats = dfsource.pull_data(session, force=True, raise_on_error=True)
         self.assertEqual(stats['created'], set())
         self.assertEqual(len(stats['updated']), 2)
         self.repo._type_source_cache.clear()
         self.repo._extid_cache.clear()
+        session.set_cnxset()
         stats = dfsource.pull_data(session, force=True, raise_on_error=True)
         self.assertEqual(stats['created'], set())
         self.assertEqual(len(stats['updated']), 2)
@@ -180,7 +182,7 @@
         self.assertEqual(e.reverse_use_email[0].login, 'sthenault')
         self.commit()
         # test everything is still fine after source synchronization
-        session.set_pool()
+        session.set_cnxset()
         stats = dfsource.pull_data(session, force=True, raise_on_error=True)
         rset = self.sexecute('EmailAddress X WHERE X address "syt@logilab.fr"')
         self.assertEqual(len(rset), 1)
@@ -197,7 +199,7 @@
         e.cw_delete()
         self.commit()
         # test everything is still fine after source synchronization
-        session.set_pool()
+        session.set_cnxset()
         stats = dfsource.pull_data(session, force=True, raise_on_error=True)
         rset = self.sexecute('EmailAddress X WHERE X address "syt@logilab.fr"')
         self.assertEqual(len(rset), 0)