@@ -523,7 +523,7 @@ def _test_tls_ciphersuites(
523523 if verify :
524524 self .assertEqual (ssl_cipher , tls_ciphersuites [0 ])
525525
526- @tests .foreach_cnx (mysql . connector . MySQLConnection )
526+ @tests .foreach_cnx ()
527527 def test_tls_v12_ciphers (self ):
528528 # verify=True means the test checks the selected cipher matches
529529 # with the one returned by the server.
@@ -532,37 +532,20 @@ def test_tls_v12_ciphers(self):
532532 tls_versions = ["TLSv1.2" ], test_case = test_case , verify = True
533533 )
534534
535- @tests .foreach_cnx (mysql . connector . MySQLConnection )
535+ @tests .foreach_cnx ()
536536 def test_tls_v13_ciphers (self ):
537537 # verify=True means the test checks the selected cipher matches
538538 # with the one returned by the server.
539+ verify = True
540+ if isinstance (self .cnx , mysql .connector .MySQLConnection ):
541+ verify = False
542+
539543 for test_case in self .tls_v13_cases :
540544 # verification should be False since cipher selection
541545 # for TLSv1.3 isn't supported.
542546 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
565548 )
566549 self ._test_tls_ciphersuites (
567- tls_versions = None , test_case = test_case , verify = True
550+ tls_versions = None , test_case = test_case , verify = verify
568551 )
0 commit comments