| 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 | |
| 440 | class TestConnection(base.PyMySQLTestCase): |