Skip to content

Commit

Permalink
Add a test for non list items in tx
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Jul 25, 2024
1 parent 46ab98a commit 2fc1db4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/src/utils/test_eth_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
class TestEthTransaction:

class TestDecodeTransaction:

async def test_should_raise_with_list_items(self, cairo_run):
transaction = {
"nonce": 0,
"gasPrice": 234567897654321,
"gas": 2_000_000,
"to": "0xF0109fC8DF283027b6285cc889F5aA624EaC1F55",
"value": [0],
"data": b"",
}
with cairo_error():
cairo_run("test__decode", data=list(encode(list(transaction.values()))))

@pytest.mark.parametrize("transaction", TRANSACTIONS)
async def test_should_decode_all_transactions_types(
self, cairo_run, transaction
Expand Down

0 comments on commit 2fc1db4

Please sign in to comment.