def METHOD_NAME(self, name):
    cn = "{}.example.com".format(name)
    # Provide python27 compatibility
    if not isinstance(cn, str):
        cn = cn.decode()
    ret = self.run_run_plus(
        fun="venafi.request",
        minion_id=cn,
        dns_name=cn,
        key_password="secretPassword",
        zone="fake",
    )
    cert_output = ret["return"][0]
    assert cert_output is not None, "venafi_certificate not found in `output_value`"
    cert = x509.load_pem_x509_certificate(cert_output.encode(), default_backend())
    assert isinstance(cert, x509.Certificate)
    assert cert.subject.get_attributes_for_oid(NameOID.COMMON_NAME) == [
        x509.NameAttribute(NameOID.COMMON_NAME, cn)
    ]
    pkey_output = ret["return"][1]
    assert pkey_output is not None, "venafi_private key not found in output_value"
    pkey = serialization.load_pem_private_key(
        pkey_output.encode(), password=b"secretPassword", backend=default_backend()
    )
    pkey_public_key_pem = pkey.public_key().public_bytes(
        encoding=serialization.Encoding.PEM,
        format=serialization.PublicFormat.SubjectPublicKeyInfo,
    )
    cert_public_key_pem = cert.public_key().public_bytes(
        encoding=serialization.Encoding.PEM,
        format=serialization.PublicFormat.SubjectPublicKeyInfo,
    )
    assert pkey_public_key_pem == cert_public_key_pem