Make cli test pass

This commit is contained in:
nolash 2021-10-10 09:57:34 +02:00
parent e606384ed2
commit 031bc5a618
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 10 additions and 9 deletions

View File

@ -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,

View File

@ -1,5 +1,5 @@
# local imports
from crypto_dev_signer.error import UnknownAccountError
from funga.error import UnknownAccountError
def jsonrpc_error(rpc_id, err):

View File

@ -19,6 +19,7 @@ logg = logging.getLogger(__name__)
class DictKeystore(EthKeystore):
def __init__(self):
super(DictKeystore, self).__init__()
self.keys = {}

View File

@ -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()