--- a/pymysql/tests/test_connection.py +++ b/pymysql/tests/test_connection.py @@ -70,6 +70,9 @@ class TestAuthentication(base.PyMySQLTestCase): for r in cur: if (r[1], r[2]) != (u'ACTIVE', u'AUTHENTICATION'): continue + if r[0] == u'unix_socket': + socket_plugin_name = r[0] + socket_found = True if r[3] == u'auth_socket.so': socket_plugin_name = r[0] socket_found = True @@ -188,7 +191,7 @@ class TestAuthentication(base.PyMySQLTestCase): cur.execute("install plugin two_questions soname 'dialog_examples.so'") TestAuthentication.two_questions_found = True self.realTestDialogAuthTwoQuestions() - except pymysql.err.InternalError: + except pymysql.err.OperationalError: pytest.skip('we couldn\'t install the two_questions plugin') finally: if TestAuthentication.two_questions_found: @@ -218,7 +221,7 @@ class TestAuthentication(base.PyMySQLTestCase): cur.execute("install plugin three_attempts soname 'dialog_examples.so'") TestAuthentication.three_attempts_found = True self.realTestDialogAuthThreeAttempts() - except pymysql.err.InternalError: + except pymysql.err.OperationalError: pytest.skip('we couldn\'t install the three_attempts plugin') finally: if TestAuthentication.three_attempts_found: