def test_withdraw_to_zero_dai_to_success(self): client = Client(PRIVATE_KEY_1, node=LOCAL_NODE) tx_hash = client.withdraw_to_zero(market=consts.MARKET_DAI, to=ADDRESS_2) self._validate_tx_hash(client, tx_hash)
def test_withdraw_to_zero_unknown_failure(self): client = Client(PRIVATE_KEY_1, node=LOCAL_NODE) with pytest.raises(ValueError) as error: client.withdraw_to_zero(market=consts.MARKET_INVALID) assert 'Invalid market number' in str(error.value)
def test_withdraw_to_zero_eth_success(self): client = Client(PRIVATE_KEY_1, node=LOCAL_NODE) tx_hash = client.withdraw_to_zero(market=consts.MARKET_WETH) self._validate_tx_hash(client, tx_hash)