(self)
| 353 | is_(fairy.driver_connection, rec.driver_connection) |
| 354 | |
| 355 | def test_rec_fairy_adapted_dialect(self): |
| 356 | dbapi = MockDBAPI() |
| 357 | |
| 358 | mock_dc = object() |
| 359 | |
| 360 | class _AdaptedDialect(_ConnDialect): |
| 361 | def get_driver_connection(self, connection): |
| 362 | return mock_dc |
| 363 | |
| 364 | p1 = pool.Pool( |
| 365 | creator=lambda: dbapi.connect("foo.db"), dialect=_AdaptedDialect() |
| 366 | ) |
| 367 | |
| 368 | rec = pool._ConnectionRecord(p1) |
| 369 | |
| 370 | assert rec.dbapi_connection is not None |
| 371 | is_not_none(rec.dbapi_connection) |
| 372 | |
| 373 | is_(rec.driver_connection, mock_dc) |
| 374 | |
| 375 | fairy = pool._ConnectionFairy(p1, rec.dbapi_connection, rec, False) |
| 376 | |
| 377 | is_not_none(fairy.dbapi_connection) |
| 378 | is_(fairy.driver_connection, mock_dc) |
| 379 | |
| 380 | is_(fairy.dbapi_connection, rec.dbapi_connection) |
| 381 | is_(fairy.driver_connection, mock_dc) |
| 382 | |
| 383 | |
| 384 | class PoolDialectTest(PoolTestBase): |
nothing calls this directly
no test coverage detected