(conn_handler)
| 240 | |
| 241 | |
| 242 | def test_reset(conn_handler): |
| 243 | conn_handler._storage = {"default": "modified_conn", "other": "other_conn"} |
| 244 | original_conn = Mock() |
| 245 | token = Mock(_handler=conn_handler, _alias="default", _old_value=original_conn, _used=False) |
| 246 | conn_handler.reset(token) |
| 247 | assert conn_handler._storage["default"] is original_conn |
| 248 | assert token._used is True |
| 249 | |
| 250 | |
| 251 | @patch("tortoise.connection.ConnectionHandler.db_config", new_callable=PropertyMock) |
nothing calls this directly
no test coverage detected
searching dependent graphs…