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

Method _add_hba_entry

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

Source from the content-addressed store, hash-verified

1851@unittest.skipIf(os.environ.get('PGHOST'), 'unmanaged cluster')
1852class TestSSLConnection(BaseTestSSLConnection):
1853 def _add_hba_entry(self):
1854 self.cluster.add_hba_entry(
1855 type='hostssl', address=ipaddress.ip_network('127.0.0.0/24'),
1856 database='postgres', user='ssl_user',
1857 auth_method='trust')
1858
1859 self.cluster.add_hba_entry(
1860 type='hostssl', address=ipaddress.ip_network('::1/128'),
1861 database='postgres', user='ssl_user',
1862 auth_method='trust')
1863
1864 async def test_ssl_connection_custom_context(self):
1865 ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)

Callers

nothing calls this directly

Calls 1

add_hba_entryMethod · 0.45

Tested by

no test coverage detected