MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / test_plugin

Method test_plugin

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

Source from the content-addressed store, hash-verified

103 # print("plugin: %r" % r[0])
104
105 def test_plugin(self):
106 conn = self.connect()
107 cur = conn.cursor()
108 cur.execute(
109 "select plugin from mysql.user where concat(user, '@', host)=current_user()"
110 )
111 for r in cur:
112 self.assertIn(conn._auth_plugin_name, (r[0], "mysql_native_password"))
113
114 @pytest.mark.skipif(not socket_auth, reason="connection to unix_socket required")
115 @pytest.mark.skipif(socket_found, reason="socket plugin already installed")

Callers

nothing calls this directly

Calls 3

cursorMethod · 0.80
executeMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected