@@ -523,7 +523,7 @@ def _test_tls_ciphersuites(
523
523
if verify :
524
524
self .assertEqual (ssl_cipher , tls_ciphersuites [0 ])
525
525
526
- @tests .foreach_cnx (mysql . connector . MySQLConnection )
526
+ @tests .foreach_cnx ()
527
527
def test_tls_v12_ciphers (self ):
528
528
# verify=True means the test checks the selected cipher matches
529
529
# with the one returned by the server.
@@ -532,37 +532,20 @@ def test_tls_v12_ciphers(self):
532
532
tls_versions = ["TLSv1.2" ], test_case = test_case , verify = True
533
533
)
534
534
535
- @tests .foreach_cnx (mysql . connector . MySQLConnection )
535
+ @tests .foreach_cnx ()
536
536
def test_tls_v13_ciphers (self ):
537
537
# verify=True means the test checks the selected cipher matches
538
538
# with the one returned by the server.
539
+ verify = True
540
+ if isinstance (self .cnx , mysql .connector .MySQLConnection ):
541
+ verify = False
542
+
539
543
for test_case in self .tls_v13_cases :
540
544
# verification should be False since cipher selection
541
545
# for TLSv1.3 isn't supported.
542
546
self ._test_tls_ciphersuites (
543
- tls_versions = ["TLSv1.3" ], test_case = test_case , verify = False
544
- )
545
- self ._test_tls_ciphersuites (
546
- tls_versions = None , test_case = test_case , verify = False
547
- )
548
-
549
- @tests .foreach_cnx (mysql .connector .CMySQLConnection )
550
- def test_tls_v12_ciphers_cext (self ):
551
- # verify=True means the test checks the selected cipher matches
552
- # with the one returned by the server.
553
- for test_case in self .tls_v12_cases :
554
- self ._test_tls_ciphersuites (
555
- tls_versions = ["TLSv1.2" ], test_case = test_case , verify = True
556
- )
557
-
558
- @tests .foreach_cnx (mysql .connector .CMySQLConnection )
559
- def test_tls_v13_ciphers_cext (self ):
560
- # verify=True means the test checks the selected cipher matches
561
- # with the one returned by the server.
562
- for test_case in self .tls_v13_cases :
563
- self ._test_tls_ciphersuites (
564
- tls_versions = ["TLSv1.3" ], test_case = test_case , verify = True
547
+ tls_versions = ["TLSv1.3" ], test_case = test_case , verify = verify
565
548
)
566
549
self ._test_tls_ciphersuites (
567
- tls_versions = None , test_case = test_case , verify = True
550
+ tls_versions = None , test_case = test_case , verify = verify
568
551
)
0 commit comments