From 36b92e90d25ce3ed8c0c4cf3a9fdeef4426fe5f4 Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Fri, 29 Sep 2023 10:36:17 -0500 Subject: [PATCH] test: better name unuse mock --- tests/functional/test_contract_container.py | 4 +--- tests/functional/test_contract_instance.py | 6 +++--- tests/functional/test_history.py | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/functional/test_contract_container.py b/tests/functional/test_contract_container.py index 41106927ad..47b2eaa376 100644 --- a/tests/functional/test_contract_container.py +++ b/tests/functional/test_contract_container.py @@ -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 diff --git a/tests/functional/test_contract_instance.py b/tests/functional/test_contract_instance.py index fc74dd23a0..48524e6787 100644 --- a/tests/functional/test_contract_instance.py +++ b/tests/functional/test_contract_instance.py @@ -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 diff --git a/tests/functional/test_history.py b/tests/functional/test_history.py index 128e3417bc..2b7283f3ea 100644 --- a/tests/functional/test_history.py +++ b/tests/functional/test_history.py @@ -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.