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

Method test_nossl_handshake_fallback

tests/test_connect.py:2787–2795  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2785 self._add_hba_entries('hostnossl', 'trust')
2786
2787 async def test_nossl_handshake_fallback(self):
2788 if self.cluster.get_pg_version() < (12, 0):
2789 self.skipTest('PostgreSQL < 12 cannot set SSL protocol version')
2790 async with self.connection_proxy() as (port, seen):
2791 await self._test_works(
2792 dsn='postgresql://ssl_user@127.0.0.1/postgres'
2793 '?sslmode=prefer&ssl_min_protocol_version=TLSv1.3',
2794 port=port, expected_ssl=False)
2795 self.assertEqual(seen, [True, False])
2796
2797 async def test_nossl_connection_sslmode(self):
2798 await self._test_sslmode_works('disable', expected_ssl=False)

Callers

nothing calls this directly

Calls 3

get_pg_versionMethod · 0.80
connection_proxyMethod · 0.80
_test_worksMethod · 0.80

Tested by

no test coverage detected