def test_get_certificate(self):
    '\n        `Connection.get_certificate` returns the local certificate.\n        '
    chain = _create_certificate_chain()
    [(cakey, cacert), (ikey, icert), (skey, scert)] = chain
    context = Context(TLSv1_METHOD)
    context.use_certificate(scert)
    client = Connection(context, None)
    cert = client.get_certificate()
    assert (cert is not None)
    assert ('Server Certificate' == cert.get_subject().CN)
`Connection.get_certificate` returns the local certificate.
def test_get_certificate(self):
    '\n        \n        '
    chain = _create_certificate_chain()
    [(cakey, cacert), (ikey, icert), (skey, scert)] = chain
    context = Context(TLSv1_METHOD)
    context.use_certificate(scert)
    client = Connection(context, None)
    cert = client.get_certificate()
    assert (cert is not None)
    assert ('Server Certificate' == cert.get_subject().CN)