(self)
| 1930 | assert c1.dbapi_connection.id != c_id |
| 1931 | |
| 1932 | def test_detach(self): |
| 1933 | dbapi, p = self._queuepool_dbapi_fixture(pool_size=1, max_overflow=0) |
| 1934 | c1 = p.connect() |
| 1935 | c1.detach() |
| 1936 | c2 = p.connect() # noqa |
| 1937 | eq_(dbapi.connect.mock_calls, [call("foo.db"), call("foo.db")]) |
| 1938 | |
| 1939 | c1_con = c1.dbapi_connection |
| 1940 | assert c1_con is not None |
| 1941 | eq_(c1_con.close.call_count, 0) |
| 1942 | c1.close() |
| 1943 | eq_(c1_con.close.call_count, 1) |
| 1944 | |
| 1945 | def test_detach_via_invalidate(self): |
| 1946 | dbapi, p = self._queuepool_dbapi_fixture(pool_size=1, max_overflow=0) |
nothing calls this directly
no test coverage detected