MCPcopy
hub / github.com/tortoise/tortoise-orm / test_init

Function test_init

tests/test_connection.py:25–30  ·  view source on GitHub ↗
(mocked_init_connections, conn_handler)

Source from the content-addressed store, hash-verified

23@pytest.mark.asyncio
24@patch("tortoise.connection.ConnectionHandler._init_connections")
25async def test_init(mocked_init_connections, conn_handler):
26 db_config = {"default": {"HOST": "some_host", "PORT": "1234"}}
27 await conn_handler._init(db_config, True)
28 mocked_init_connections.assert_awaited_once()
29 assert db_config == conn_handler._db_config
30 assert conn_handler._create_db is True
31
32
33def test_db_config_present(conn_handler):

Callers

nothing calls this directly

Calls 1

_initMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…