':py:obj:`sign` generates a cryptographic signature which :py:obj:`verify` can check.
Deprecation warnings raised because using text instead of bytes as content'

def test_sign_verify_with_text(self):

    content = 'It    was    a    bright    cold    day    in    April,    and    the    clocks    were    striking    thirteen.    Winston    Smith,    his    chin    nuzzled    into    his    breast    in    an    effort    to    escape    the    vile    wind,    slipped    quickly    through    the    glass    doors    of    Victory    Mansions,    though    not    quickly    enough    to    prevent    a    swirl    of    gritty    dust    from    entering    along    with    him.'.decode('ascii')
    priv_key = load_privatekey(FILETYPE_PEM, root_key_pem)
    cert = load_certificate(FILETYPE_PEM, root_cert_pem)
    for digest in ['md5', 'sha1']:
        with catch_warnings(record=True) as w:
            simplefilter('always')
            sig = sign(priv_key, content, digest)
            self.assertEqual('{0}    for    data    is    no    longer    accepted,    use    bytes'.format(WARNING_TYPE_EXPECTED), str(w[(-1)].message))
            self.assertIs(w[(-1)].category, DeprecationWarning)
        with catch_warnings(record=True) as w:
            simplefilter('always')
            verify(cert, sig, content, digest)
            self.assertEqual('{0}    for    data    is    no    longer    accepted,    use    bytes'.format(WARNING_TYPE_EXPECTED), str(w[(-1)].message))
            self.assertIs(w[(-1)].category, DeprecationWarning)
