MCPcopy
hub / github.com/PyMySQL/PyMySQL / test_caching_sha2_password_ssl

Function test_caching_sha2_password_ssl

tests/test_auth.py:88–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86
87
88def test_caching_sha2_password_ssl():
89 con = pymysql.connect(
90 user="user_caching_sha2",
91 password=pass_caching_sha2,
92 host=host,
93 port=port,
94 ssl=ssl,
95 )
96 con.close()
97
98 # Fast path of caching sha2
99 con = pymysql.connect(
100 user="user_caching_sha2",
101 password=pass_caching_sha2,
102 host=host,
103 port=port,
104 ssl=ssl,
105 )
106 con.query("FLUSH PRIVILEGES")
107 con.close()
108
109 # Fast path after auth_switch_request
110 pymysql.connections._DEFAULT_AUTH_PLUGIN = "mysql_native_password"
111 con = pymysql.connect(
112 user="user_caching_sha2",
113 password=pass_caching_sha2,
114 host=host,
115 port=port,
116 ssl=ssl,
117 )
118 con.query("FLUSH PRIVILEGES")
119 con.close()
120 pymysql.connections._DEFAULT_AUTH_PLUGIN = None

Callers

nothing calls this directly

Calls 3

queryMethod · 0.80
connectMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…