File tree 2 files changed +28
-0
lines changed 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,7 @@ def config(self, **kwargs):
276
276
compat_map = [
277
277
# (<other driver argument>,<translates to>)
278
278
('db' , 'database' ),
279
+ ('username' , 'user' ),
279
280
('passwd' , 'password' ),
280
281
('connect_timeout' , 'connection_timeout' ),
281
282
]
Original file line number Diff line number Diff line change @@ -5626,3 +5626,30 @@ def test_retrieve_from_LONGBLOB(self):
5626
5626
5627
5627
cur .close ()
5628
5628
cnx .close ()
5629
+
5630
+
5631
+ class BugOra29324966 (tests .MySQLConnectorTests ):
5632
+ """BUG#29324966: ADD MISSING USERNAME CONNECTION ARGUMENT FOR DRIVER
5633
+ COMPATIBILITY.
5634
+ """
5635
+ def setUp (self ):
5636
+ pass
5637
+
5638
+ def tearDown (self ):
5639
+ pass
5640
+
5641
+ @foreach_cnx ()
5642
+ def test_connection_args_compatibility (self ):
5643
+ config = self .config .copy ()
5644
+ config ["username" ] = config ["user" ]
5645
+ config ["passwd" ] = config ["password" ]
5646
+ config ["db" ] = config ["database" ]
5647
+ config ["connect_timeout" ] = config ["connection_timeout" ]
5648
+
5649
+ config .pop ("user" )
5650
+ config .pop ("password" )
5651
+ config .pop ("database" )
5652
+ config .pop ("connection_timeout" )
5653
+
5654
+ cnx = self .cnx .__class__ (** config )
5655
+ cnx .close ()
You can’t perform that action at this time.
0 commit comments