@@ -199,7 +199,7 @@ def realTestDialogAuthTwoQuestions(self):
199
199
self .databases [0 ]['db' ], 'two_questions' , 'notverysecret' ) as u :
200
200
with self .assertRaises (pymysql .err .OperationalError ):
201
201
pymysql .connect (user = 'pymysql_2q' , ** self .db )
202
- pymysql .connect (user = 'pymysql_2q' , plugin_map = {b'dialog' : TestAuthentication .Dialog }, ** self .db )
202
+ pymysql .connect (user = 'pymysql_2q' , auth_plugin_map = {b'dialog' : TestAuthentication .Dialog }, ** self .db )
203
203
204
204
@unittest2 .skipUnless (socket_auth , "connection to unix_socket required" )
205
205
@unittest2 .skipIf (three_attempts_found , "three_attempts plugin already installed" )
@@ -226,21 +226,21 @@ def realTestDialogAuthThreeAttempts(self):
226
226
TestAuthentication .Dialog .fail = True # fail just once. We've got three attempts after all
227
227
with TempUser (self .connections [0 ].cursor (), 'pymysql_3a@localhost' ,
228
228
self .databases [0 ]['db' ], 'three_attempts' , 'stillnotverysecret' ) as u :
229
- pymysql .connect (user = 'pymysql_3a' , plugin_map = {b'dialog' : TestAuthentication .Dialog }, ** self .db )
230
- pymysql .connect (user = 'pymysql_3a' , plugin_map = {b'dialog' : TestAuthentication .DialogHandler }, ** self .db )
229
+ pymysql .connect (user = 'pymysql_3a' , auth_plugin_map = {b'dialog' : TestAuthentication .Dialog }, ** self .db )
230
+ pymysql .connect (user = 'pymysql_3a' , auth_plugin_map = {b'dialog' : TestAuthentication .DialogHandler }, ** self .db )
231
231
with self .assertRaises (pymysql .err .OperationalError ):
232
- pymysql .connect (user = 'pymysql_3a' , plugin_map = {b'dialog' : object }, ** self .db )
232
+ pymysql .connect (user = 'pymysql_3a' , auth_plugin_map = {b'dialog' : object }, ** self .db )
233
233
234
234
with self .assertRaises (pymysql .err .OperationalError ):
235
- pymysql .connect (user = 'pymysql_3a' , plugin_map = {b'dialog' : TestAuthentication .DefectiveHandler }, ** self .db )
235
+ pymysql .connect (user = 'pymysql_3a' , auth_plugin_map = {b'dialog' : TestAuthentication .DefectiveHandler }, ** self .db )
236
236
with self .assertRaises (pymysql .err .OperationalError ):
237
- pymysql .connect (user = 'pymysql_3a' , plugin_map = {b'notdialogplugin' : TestAuthentication .Dialog }, ** self .db )
237
+ pymysql .connect (user = 'pymysql_3a' , auth_plugin_map = {b'notdialogplugin' : TestAuthentication .Dialog }, ** self .db )
238
238
TestAuthentication .Dialog .m = {b'Password, please:' : b'I do not know' }
239
239
with self .assertRaises (pymysql .err .OperationalError ):
240
- pymysql .connect (user = 'pymysql_3a' , plugin_map = {b'dialog' : TestAuthentication .Dialog }, ** self .db )
240
+ pymysql .connect (user = 'pymysql_3a' , auth_plugin_map = {b'dialog' : TestAuthentication .Dialog }, ** self .db )
241
241
TestAuthentication .Dialog .m = {b'Password, please:' : None }
242
242
with self .assertRaises (pymysql .err .OperationalError ):
243
- pymysql .connect (user = 'pymysql_3a' , plugin_map = {b'dialog' : TestAuthentication .Dialog }, ** self .db )
243
+ pymysql .connect (user = 'pymysql_3a' , auth_plugin_map = {b'dialog' : TestAuthentication .Dialog }, ** self .db )
244
244
245
245
@unittest2 .skipUnless (socket_auth , "connection to unix_socket required" )
246
246
@unittest2 .skipIf (pam_found , "pam plugin already installed" )
@@ -286,12 +286,16 @@ def realTestPamAuth(self):
286
286
c = pymysql .connect (user = TestAuthentication .osuser , ** db )
287
287
db ['password' ] = 'very bad guess at password'
288
288
with self .assertRaises (pymysql .err .OperationalError ):
289
- pymysql .connect (user = TestAuthentication .osuser , plugin_map = {b'mysql_cleartext_password' : TestAuthentication .DefectiveHandler }, ** self .db )
289
+ pymysql .connect (user = TestAuthentication .osuser ,
290
+ auth_plugin_map = {b'mysql_cleartext_password' : TestAuthentication .DefectiveHandler },
291
+ ** self .db )
290
292
except pymysql .OperationalError as e :
291
293
self .assertEqual (1045 , e .args [0 ])
292
294
# we had 'bad guess at password' work with pam. Well at least we get a permission denied here
293
295
with self .assertRaises (pymysql .err .OperationalError ):
294
- pymysql .connect (user = TestAuthentication .osuser , plugin_map = {b'mysql_cleartext_password' : TestAuthentication .DefectiveHandler }, ** self .db )
296
+ pymysql .connect (user = TestAuthentication .osuser ,
297
+ auth_plugin_map = {b'mysql_cleartext_password' : TestAuthentication .DefectiveHandler },
298
+ ** self .db )
295
299
if grants :
296
300
# recreate the user
297
301
cur .execute (grants )
0 commit comments