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

Method test_nossl_connection_sslmode

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

Source from the content-addressed store, hash-verified

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)
2799 await self._test_sslmode_works('allow', expected_ssl=False)
2800 await self._test_sslmode_works('prefer', expected_ssl=False)
2801 await self._test_sslmode_fails('require')
2802 with mock_dot_postgresql():
2803 await self._test_sslmode_fails('require')
2804 await self._test_sslmode_fails('verify-ca')
2805 await self._test_sslmode_fails('verify-full')
2806
2807 async def test_nossl_connection_prefer_cancel(self):
2808 con = await self.connect(

Callers

nothing calls this directly

Calls 3

mock_dot_postgresqlFunction · 0.85
_test_sslmode_worksMethod · 0.80
_test_sslmode_failsMethod · 0.80

Tested by

no test coverage detected