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

Method rejected

tests/test_connect.py:2462–2469  ·  view source on GitHub ↗
(**kwargs)

Source from the content-addressed store, hash-verified

2460 base_dsn = 'postgresql://ssl_user@localhost/postgres'
2461
2462 async def rejected(**kwargs):
2463 async with self.connection_proxy() as (port, seen):
2464 with self.assertRaisesRegex(
2465 asyncpg.ClientConfigurationError,
2466 'direct TLS requires sslmode',
2467 ):
2468 await self.connect(port=port, **kwargs)
2469 self.assertEqual(seen, [])
2470
2471 for mode in ('disable', 'allow', 'prefer'):
2472 with self.subTest(mode=mode):

Callers

nothing calls this directly

Calls 2

connection_proxyMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected