MCPcopy Index your code
hub / github.com/webpy/webpy / testPooling

Method testPooling

tests/test_db.py:145–156  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

143 self.assertRows(2)
144
145 def testPooling(self):
146 # can't test pooling if DBUtils is not installed
147 try:
148 import dbutils # noqa: F401
149 except ImportError:
150 return
151 db = setup_database(self.dbname, pooling=True)
152 try:
153 self.assertEqual(db.ctx.db.__class__.__module__, "dbutils.pooled_db")
154 db.select("person", limit=1)
155 finally:
156 db.ctx.db.close()
157
158 def test_multiple_insert(self):
159 db = self.db

Callers

nothing calls this directly

Calls 2

setup_databaseFunction · 0.85
selectMethod · 0.80

Tested by

no test coverage detected