Rehabilitate tests
This commit is contained in:
parent
0edbfbc29c
commit
9149024231
@ -78,7 +78,6 @@ class MaxGasOracle:
|
|||||||
return MAXIMUM_FEE_UNITS
|
return MAXIMUM_FEE_UNITS
|
||||||
|
|
||||||
|
|
||||||
#def create_check_gas_task(tx_signed_raws_hex, chain_spec, holder_address, gas=None, tx_hashes_hex=None, queue=None):
|
|
||||||
def create_check_gas_task(tx_signed_raws_hex, chain_spec, holder_address, gas=None, tx_hashes_hex=None, queue=None):
|
def create_check_gas_task(tx_signed_raws_hex, chain_spec, holder_address, gas=None, tx_hashes_hex=None, queue=None):
|
||||||
"""Creates a celery task signature for a check_gas task that adds the task to the outgoing queue to be processed by the dispatcher.
|
"""Creates a celery task signature for a check_gas task that adds the task to the outgoing queue to be processed by the dispatcher.
|
||||||
|
|
||||||
|
@ -43,7 +43,8 @@ class CustodialTaskNonceOracle():
|
|||||||
:returns: Nonce
|
:returns: Nonce
|
||||||
:rtype: number
|
:rtype: number
|
||||||
"""
|
"""
|
||||||
r = NonceReservation.release(self.address, self.uuid, session=self.session)
|
address = tx_normalize.wallet_address(self.address)
|
||||||
|
r = NonceReservation.release(address, self.uuid, session=self.session)
|
||||||
return r[1]
|
return r[1]
|
||||||
|
|
||||||
|
|
||||||
@ -70,7 +71,8 @@ def reserve_nonce(self, chained_input, chain_spec_dict, signer_address=None):
|
|||||||
raise ValueError('invalid result when resolving address for nonce {}'.format(address))
|
raise ValueError('invalid result when resolving address for nonce {}'.format(address))
|
||||||
|
|
||||||
root_id = self.request.root_id
|
root_id = self.request.root_id
|
||||||
r = NonceReservation.next(tx_normalize.wallet_address(address), root_id, session=session)
|
address = tx_normalize.wallet_address(address)
|
||||||
|
r = NonceReservation.next(address, root_id, session=session)
|
||||||
logg.debug('nonce {} reserved for address {} task {}'.format(r[1], address, r[0]))
|
logg.debug('nonce {} reserved for address {} task {}'.format(r[1], address, r[0]))
|
||||||
|
|
||||||
session.commit()
|
session.commit()
|
||||||
|
@ -17,6 +17,7 @@ from cic_eth_registry import CICRegistry
|
|||||||
from erc20_transfer_authorization import TransferAuthorization
|
from erc20_transfer_authorization import TransferAuthorization
|
||||||
|
|
||||||
# local imports
|
# local imports
|
||||||
|
from cic_eth.encode import tx_normalize
|
||||||
from .base import SyncFilter
|
from .base import SyncFilter
|
||||||
|
|
||||||
|
|
||||||
@ -52,9 +53,9 @@ class TransferAuthFilter(SyncFilter):
|
|||||||
|
|
||||||
r = TransferAuthorization.parse_create_request_request(tx.payload)
|
r = TransferAuthorization.parse_create_request_request(tx.payload)
|
||||||
|
|
||||||
sender = r[0]
|
sender = tx_normalize.wallet_address(r[0])
|
||||||
recipient = r[1]
|
recipient = tx_normalize.wallet_address(r[1])
|
||||||
token = r[2]
|
token = tx_normalize.executable_address(r[2])
|
||||||
value = r[3]
|
value = r[3]
|
||||||
|
|
||||||
token_data = {
|
token_data = {
|
||||||
|
@ -110,8 +110,8 @@ def test_tag_account(
|
|||||||
t = api.tag_account('bar', agent_roles['CAROL'], default_chain_spec)
|
t = api.tag_account('bar', agent_roles['CAROL'], default_chain_spec)
|
||||||
t.get()
|
t.get()
|
||||||
|
|
||||||
assert AccountRole.get_address('foo', init_database) == agent_roles['ALICE']
|
assert AccountRole.get_address('foo', init_database) == tx_normalize.wallet_address(agent_roles['ALICE'])
|
||||||
assert AccountRole.get_address('bar', init_database) == agent_roles['CAROL']
|
assert AccountRole.get_address('bar', init_database) == tx_normalize.wallet_address(agent_roles['CAROL'])
|
||||||
|
|
||||||
|
|
||||||
def test_tx(
|
def test_tx(
|
||||||
|
Loading…
Reference in New Issue
Block a user