From 031bc5a618c3e44aaf8ef649e96eea93be237000 Mon Sep 17 00:00:00 2001 From: nolash Date: Sun, 10 Oct 2021 09:57:34 +0200 Subject: [PATCH] Make cli test pass --- funga/eth/cli/handle.py | 6 +++--- funga/eth/cli/jsonrpc.py | 2 +- funga/eth/keystore/dict.py | 1 + tests/test_cli.py | 10 +++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/funga/eth/cli/handle.py b/funga/eth/cli/handle.py index a58f290..fc6ca2a 100644 --- a/funga/eth/cli/handle.py +++ b/funga/eth/cli/handle.py @@ -11,12 +11,12 @@ from jsonrpc.exceptions import ( from hexathon import add_0x # local imports -from crypto_dev_signer.eth.transaction import EIP155Transaction -from crypto_dev_signer.error import ( +from funga.eth.transaction import EIP155Transaction +from funga.error import ( UnknownAccountError, SignerError, ) -from crypto_dev_signer.cli.jsonrpc import jsonrpc_ok +from funga.eth.cli.jsonrpc import jsonrpc_ok from .jsonrpc import ( jsonrpc_error, is_valid_json, diff --git a/funga/eth/cli/jsonrpc.py b/funga/eth/cli/jsonrpc.py index 434c170..384a3c8 100644 --- a/funga/eth/cli/jsonrpc.py +++ b/funga/eth/cli/jsonrpc.py @@ -1,5 +1,5 @@ # local imports -from crypto_dev_signer.error import UnknownAccountError +from funga.error import UnknownAccountError def jsonrpc_error(rpc_id, err): diff --git a/funga/eth/keystore/dict.py b/funga/eth/keystore/dict.py index b1fcfda..b37da11 100644 --- a/funga/eth/keystore/dict.py +++ b/funga/eth/keystore/dict.py @@ -19,6 +19,7 @@ logg = logging.getLogger(__name__) class DictKeystore(EthKeystore): def __init__(self): + super(DictKeystore, self).__init__() self.keys = {} diff --git a/tests/test_cli.py b/tests/test_cli.py index 752e9e8..d7a1898 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -7,10 +7,10 @@ import os from hexathon import strip_0x # local imports -from crypto_dev_signer.eth.signer import ReferenceSigner -from crypto_dev_signer.keystore.dict import DictKeystore -from crypto_dev_signer.cli.handle import SignRequestHandler -from crypto_dev_signer.eth.transaction import EIP155Transaction +from funga.eth.signer import EIP155Signer +from funga.eth.keystore.dict import DictKeystore +from funga.eth.cli.handle import SignRequestHandler +from funga.eth.transaction import EIP155Transaction logging.basicConfig(level=logging.DEBUG) logg = logging.getLogger() @@ -25,7 +25,7 @@ class TestCli(unittest.TestCase): #pk_getter = pkGetter(pk) self.keystore = DictKeystore() SignRequestHandler.keystore = self.keystore - self.signer = ReferenceSigner(self.keystore) + self.signer = EIP155Signer(self.keystore) SignRequestHandler.signer = self.signer self.handler = SignRequestHandler()