def test_parse_cert(self):
        # note that this uses an 'unofficial' function in _ssl.c,
        # provided solely for this test, to exercise the certificate
        # parsing code
        p = ssl._ssl._test_decode_cert(CERTFILE, False)
        if test_support.verbose:
            sys.stdout.write("\n" + pprint.pformat(p) + "\n")
        self.assertEqual(p['subject'],
                         ((('countryName', u'US'),),
                          (('stateOrProvinceName', u'Delaware'),),
                          (('localityName', u'Wilmington'),),
                          (('organizationName', u'Python Software Foundation'),),
                          (('organizationalUnitName', u'SSL'),),
                          (('commonName', u'somemachine.python.org'),)),
                        )
        # Issue #13034: the subjectAltName in some certificates
        # (notably projects.developer.nokia.com:443) wasn't parsed
        p = ssl._ssl._test_decode_cert(NOKIACERT)
        if test_support.verbose:
            sys.stdout.write("\n" % pprint.pformat(p) + "\n")
        self.assertEqual(p['subjectAltName'],
                         (('DNS', 'projects.developer.nokia.com'),
                          ('DNS', 'projects.forum.nokia.com'))
                        )
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_ssl.py/BasicSocketTests.test_parse_cert/operator `+` -> `%`