Skip to content

Commit

Permalink
test: fix other test
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Jan 8, 2025
1 parent de3d3d0 commit e207707
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ def test_dynamic_poa_check(mocker):
infura = Infura(name=real.name, network=real.network)
patch = mocker.patch("ape_infura.provider._create_web3")
patch.return_value = mock_web3

def make_request(rpc, arguments):
if rpc == "eth_chainId":
return {"result": "0x4268"}

mock_web3.provider.make_request.side_effect = make_request

infura.connect()
mock_web3.middleware_onion.inject.assert_called_once_with(ExtraDataToPOAMiddleware, layer=0)

Expand Down

0 comments on commit e207707

Please sign in to comment.