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 36b92e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
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 36b92e9

Please sign in to comment.