diff --git a/tests/conftest.py b/tests/conftest.py index 481fa57a..b4ed6caf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,9 +2,12 @@ import os import sys +import brownie from brownie import network sys.path.insert(0, os.path.abspath('.')) +brownie._CONFIG.settings['autofetch_sources'] = True + if not network.is_connected(): network.connect(os.environ["PYTEST_NETWORK"]) diff --git a/tests/test_brownie_patch.py b/tests/test_brownie_patch.py index c581a267..068996df 100644 --- a/tests/test_brownie_patch.py +++ b/tests/test_brownie_patch.py @@ -10,9 +10,9 @@ from dank_mids.brownie_patch.call import _patch_call -# must use from_explorer for gh testing workflow # NOTE: we don't want tests to fail due to api limits -get_contract = eth_retry.auto_retry(brownie.Contract.from_explorer) +get_contract = eth_retry.auto_retry(brownie.Contract) +# must try from_explorer too get_dank_contract = eth_retry.auto_retry(dank_mids.Contract.from_explorer) @pytest.mark.asyncio_cooperative diff --git a/tests/test_examples.py b/tests/test_examples.py index bd49a8ed..fc72b7ce 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -1,7 +1,6 @@ import pytest -import brownie import eth_retry import examples.dank_brownie_example @@ -10,7 +9,4 @@ @pytest.mark.asyncio_cooperative @eth_retry.auto_retry # retry etherscan rate limit errors async def test_dank_brownie_example(): - with pytest.raises(ValueError): - await examples.dank_brownie_example._main() - brownie._CONFIG.settings['autofetch_sources'] = True await examples.dank_brownie_example._main()