MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / _run_connection_test

Method _run_connection_test

tests/test_connect.py:2919–2924  ·  view source on GitHub ↗
(
        self, connect, target_attribute, expected_port
    )

Source from the content-addressed store, hash-verified

2917 await con.close()
2918
2919 async def _run_connection_test(
2920 self, connect, target_attribute, expected_port
2921 ):
2922 conn = await connect(target_session_attrs=target_attribute)
2923 self.assertTrue(_get_connected_host(conn).endswith(expected_port))
2924 await conn.close()
2925
2926 async def test_target_server_attribute_port(self):
2927 master_port = self.master_cluster.get_connection_spec()['port']

Callers 1

Calls 3

connectFunction · 0.85
_get_connected_hostFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected