MCPcopy
hub / github.com/PyMySQL/PyMySQL / testAuthEd25519

Method testAuthEd25519

pymysql/tests/test_connection.py:411–437  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

409
410 @pytest.mark.skipif(not ed25519_found, reason="no ed25519 authention plugin")
411 def testAuthEd25519(self):
412 db = self.db.copy()
413 del db["password"]
414 conn = self.connect()
415 c = conn.cursor()
416 c.execute("select ed25519_password(''), ed25519_password('ed25519_password')")
417 for r in c:
418 empty_pass = r[0].decode("ascii")
419 non_empty_pass = r[1].decode("ascii")
420
421 with TempUser(
422 c,
423 "pymysql_ed25519",
424 self.databases[0]["database"],
425 "ed25519",
426 empty_pass,
427 ):
428 pymysql.connect(user="pymysql_ed25519", password="", **db)
429
430 with TempUser(
431 c,
432 "pymysql_ed25519",
433 self.databases[0]["database"],
434 "ed25519",
435 non_empty_pass,
436 ):
437 pymysql.connect(user="pymysql_ed25519", password="ed25519_password", **db)
438
439
440class TestConnection(base.PyMySQLTestCase):

Callers

nothing calls this directly

Calls 4

TempUserClass · 0.85
cursorMethod · 0.80
executeMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected