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

Method test_auth_password_md5

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

Source from the content-addressed store, hash-verified

324 password=lambda: get_wrongpassword())
325
326 async def test_auth_password_md5(self):
327 conn = await self.connect(
328 user='md5_user', password=CORRECT_PASSWORD)
329 await conn.close()
330
331 with self.assertRaisesRegex(
332 asyncpg.InvalidPasswordError,
333 'password authentication failed for user "md5_user"'):
334 await self._try_connect(
335 user='md5_user', password='wrongpassword')
336
337 async def test_auth_password_scram_sha_256(self):
338 # scram is only supported in PostgreSQL 10 and above

Callers

nothing calls this directly

Calls 3

_try_connectMethod · 0.95
connectMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected