Skip to content

Commit

Permalink
test: better name unuse mock
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Sep 29, 2023
1 parent 2f763a1 commit 25b444c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions tests/functional/test_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ def clear_network_property_cached():
clear_network_property_cached()


@pytest.mark.parametrize("type_", (TransactionType.STATIC, TransactionType.DYNAMIC))
def test_prepare_transaction_and_call_using_max_gas(type_, ethereum, sender, eth_tester_provider):
tx = ethereum.create_transaction(type=type_.value)
@pytest.mark.parametrize("tx_type", (TransactionType.STATIC, TransactionType.DYNAMIC))
def test_prepare_transaction_and_call_using_max_gas(tx_type, ethereum, sender, eth_tester_provider):
tx = ethereum.create_transaction(type=tx_type.value)
tx = sender.prepare_transaction(tx)
assert tx.gas_limit == eth_tester_provider.max_gas, "Test setup failed - gas limit unexpected."

Expand Down
4 changes: 1 addition & 3 deletions tests/functional/test_contract_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ def test_deploy_and_publish(owner, contract_container, dummy_live_network, mock_
mock_explorer.publish_contract.assert_called_once_with(contract.address)


def test_deploy_and_not_publish(
mocker, owner, contract_container, dummy_live_network, mock_explorer
):
def test_deploy_and_not_publish(owner, contract_container, dummy_live_network, mock_explorer):
dummy_live_network.__dict__["explorer"] = mock_explorer
contract_container.deploy(0, sender=owner, publish=False, required_confirmations=0)
assert not mock_explorer.call_count
Expand Down
6 changes: 3 additions & 3 deletions tests/functional/test_contract_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def test_sending_funds_to_non_payable_constructor_by_accountDeploy(
owner.deploy(solidity_contract_container, 1, value="1 ether")


@pytest.mark.parametrize("type_", TransactionType)
def test_as_transaction(type_, vyper_contract_instance, owner, eth_tester_provider):
tx = vyper_contract_instance.setNumber.as_transaction(987, sender=owner, type=type_.value)
@pytest.mark.parametrize("tx_type", TransactionType)
def test_as_transaction(tx_type, vyper_contract_instance, owner, eth_tester_provider):
tx = vyper_contract_instance.setNumber.as_transaction(987, sender=owner, type=tx_type.value)
assert tx.gas_limit == eth_tester_provider.max_gas
2 changes: 1 addition & 1 deletion tests/functional/test_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_history(sender, receiver, chain):

@explorer_test
def test_history_caches_sender_over_address_key(
mocker, chain, eth_tester_provider, sender, vyper_contract_container, ethereum, mock_explorer
chain, eth_tester_provider, sender, vyper_contract_container, ethereum, mock_explorer
):
# When getting receipts from the explorer for contracts, it includes transactions
# made to the contract. This test shows we cache by sender and not address key.
Expand Down

0 comments on commit 25b444c

Please sign in to comment.