From e2794eff2a08414dcdee901bf6f77511d3dfd26e Mon Sep 17 00:00:00 2001 From: Sergi Delgado Segura Date: Tue, 11 Feb 2020 19:27:33 +0100 Subject: [PATCH] Modifies e2e tests to match alpha cli.load_keys --- test/pisa/e2e/test_basic_e2e.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/pisa/e2e/test_basic_e2e.py b/test/pisa/e2e/test_basic_e2e.py index 8a6df9f..a8f83e7 100644 --- a/test/pisa/e2e/test_basic_e2e.py +++ b/test/pisa/e2e/test_basic_e2e.py @@ -125,13 +125,15 @@ def test_appointment_wrong_key(bitcoin_cli, create_txs): appointment_data["encrypted_blob"] = Cryptographer.encrypt(Blob(penalty_tx), appointment_data.get("tx_id")) appointment = Appointment.from_dict(appointment_data) - pisa_pk, cli_sk, cli_pk_der = wt_cli.load_keys( - cli_conf.get("PISA_PUBLIC_KEY"), cli_conf.get("CLI_PRIVATE_KEY"), cli_conf.get("CLI_PUBLIC_KEY") - ) - hex_pk_der = binascii.hexlify(cli_pk_der) - - signature = Cryptographer.sign(appointment.serialize(), cli_sk) - data = {"appointment": appointment.to_dict(), "signature": signature, "public_key": hex_pk_der.decode("utf-8")} + # pisa_pk, cli_sk, cli_pk_der = wt_cli.load_keys( + # cli_conf.get("PISA_PUBLIC_KEY"), cli_conf.get("CLI_PRIVATE_KEY"), cli_conf.get("CLI_PUBLIC_KEY") + # ) + # hex_pk_der = binascii.hexlify(cli_pk_der) + # + # signature = Cryptographer.sign(appointment.serialize(), cli_sk) + # data = {"appointment": appointment.to_dict(), "signature": signature, "public_key": hex_pk_der.decode("utf-8")} + pisa_pk = wt_cli.load_keys() + data = {"appointment": appointment.to_dict()} # Send appointment to the server. response = wt_cli.post_appointment(data)