(self)
| 385 | |
| 386 | class MockReconnectTest(fixtures.TestBase): |
| 387 | def setup_test(self): |
| 388 | self.dbapi = MockDBAPI() |
| 389 | |
| 390 | self.db = testing_engine( |
| 391 | "postgresql+psycopg2://foo:bar@localhost/test", |
| 392 | options=dict(module=self.dbapi, _initialize=False), |
| 393 | ) |
| 394 | |
| 395 | self.mock_connect = call( |
| 396 | host="localhost", password="bar", user="foo", dbname="test" |
| 397 | ) |
| 398 | # monkeypatch disconnect checker |
| 399 | self.db.dialect.is_disconnect = lambda e, conn, cursor: isinstance( |
| 400 | e, MockDisconnect |
| 401 | ) |
| 402 | |
| 403 | def teardown_test(self): |
| 404 | self.dbapi.dispose() |
nothing calls this directly
no test coverage detected