'A PKCS12 string generated using the openssl command line can be loaded
with :py:obj:`load_pkcs12` and its components extracted and examined.
Using text as passphrase instead of bytes. DeprecationWarning expected.'

def test_load_pkcs12_text_passphrase(self):

    pem = (client_key_pem + client_cert_pem)
    passwd = 'whatever'
    p12_str = _runopenssl(pem, 'pkcs12', '-export', '-clcerts', '-passout', ('pass:' + passwd))
    with catch_warnings(record=True) as w:
        simplefilter('always')
        p12 = load_pkcs12(p12_str, passphrase='whatever'.decode('ascii'))
        self.assertEqual('{0}    for    passphrase    is    no    longer    accepted,    use    bytes'.format(WARNING_TYPE_EXPECTED), str(w[(-1)].message))
        self.assertIs(w[(-1)].category, DeprecationWarning)
    self.verify_pkcs12_container(p12)
