Exemplo n.º 1
0
 def test_address_is_fetched_from_contract_data_if_available(
     self, mock_address, runner, tmp_path
 ):
     token = Token(runner, tmp_path)
     token.contract_data = {"address": 100}
     mock_address.return_value = 200
     assert token.address == 100
Exemplo n.º 2
0
    def test_checksum_address_returns_checksummed_raw_address_from_contract_data_if_available(
            self, mock_checksum, runner, tmp_path):
        token = Token(runner, tmp_path)

        raw_addr = "0x12ae66cdc592e10b60f9097a7b0d3c59fce29876"
        token.contract_data = {"address": raw_addr}
        token.checksum_address
        mock_checksum.assert_called_once_with(raw_addr)