MCPcopy Index your code
hub / github.com/MagicStack/asyncpg / _add_hba_entry

Method _add_hba_entry

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

Source from the content-addressed store, hash-verified

2057@unittest.skipIf(os.environ.get('PGHOST'), 'unmanaged cluster')
2058class TestClientSSLConnection(BaseTestSSLConnection):
2059 def _add_hba_entry(self):
2060 self.cluster.add_hba_entry(
2061 type='hostssl', address=ipaddress.ip_network('127.0.0.0/24'),
2062 database='postgres', user='ssl_user',
2063 auth_method='cert')
2064
2065 self.cluster.add_hba_entry(
2066 type='hostssl', address=ipaddress.ip_network('::1/128'),
2067 database='postgres', user='ssl_user',
2068 auth_method='cert')
2069
2070 async def test_ssl_connection_client_auth_fails_with_wrong_setup(self):
2071 ssl_context = ssl.create_default_context(

Callers

nothing calls this directly

Calls 1

add_hba_entryMethod · 0.45

Tested by

no test coverage detected