def test_check_privatekey_invalid(self):
    "\n        `Context.check_privatekey` raises `Error` if the `Context` instance\n        has been configured to use a key and certificate pair which don't\n        relate to each other.\n        "
    key = load_privatekey(FILETYPE_PEM, client_key_pem)
    cert = load_certificate(FILETYPE_PEM, server_cert_pem)
    context = Context(TLSv1_METHOD)
    context.use_privatekey(key)
    context.use_certificate(cert)
    with pytest.raises(Error):
        context.check_privatekey()
`Context.check_privatekey` raises `Error` if the `Context` instance
has been configured to use a key and certificate pair which don't
relate to each other.
def test_check_privatekey_invalid(self):
    "\n        `Context.check_privatekey` raises `Error` if the `Context` instance\n        has been configured to use a key and certificate pair which don't\n        relate to each other.\n        "
    key = load_privatekey(FILETYPE_PEM, client_key_pem)
    cert = load_certificate(FILETYPE_PEM, server_cert_pem)
    context = Context(TLSv1_METHOD)
    context.use_privatekey(key)
    context.use_certificate(cert)
    with pytest.raises(Error):
        context.check_privatekey()