MCPcopy
hub / github.com/PyMySQL/PyMySQL / test_plugin

Method test_plugin

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

Source from the content-addressed store, hash-verified

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