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

Method test_auth_password_cleartext

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

Source from the content-addressed store, hash-verified

258 await self._try_connect(user='reject_user')
259
260 async def test_auth_password_cleartext(self):
261 conn = await self.connect(
262 user='password_user',
263 password=CORRECT_PASSWORD)
264 await conn.close()
265
266 with self.assertRaisesRegex(
267 asyncpg.InvalidPasswordError,
268 'password authentication failed for user "password_user"'):
269 await self._try_connect(
270 user='password_user',
271 password='wrongpassword')
272
273 async def test_auth_password_cleartext_without_password(self):
274 with self.assertRaises(asyncpg.InvalidPasswordError):

Callers

nothing calls this directly

Calls 3

_try_connectMethod · 0.95
connectMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected