def test_connection_setup(self):
cur = self.conn.cursor()
sync_cur = self.sync_conn.cursor()
del cur, sync_cur
self.assertTrue(self.conn.async_)
self.assertTrue(not self.sync_conn.async_)
# the async connection should be autocommit
self.assertTrue(self.conn.autocommit)
self.assertEqual(self.conn.isolation_level, ext.ISOLATION_LEVEL_DEFAULT)
# check other properties to be found on the connection
self.assertTrue(self.conn.server_version)
self.assertTrue(self.conn.protocol_version in (2, 3))
self.assertTrue(self.conn.encoding in ext.encodings)
评论列表
文章目录