diff --git a/tests/core/contracts/test_contract_buildTransaction.py b/tests/core/contracts/test_contract_buildTransaction.py index bfdc71b9a0..18ade12c7f 100644 --- a/tests/core/contracts/test_contract_buildTransaction.py +++ b/tests/core/contracts/test_contract_buildTransaction.py @@ -4,40 +4,13 @@ dissoc, ) -from web3 import Web3 from web3.exceptions import ( ValidationError, ) -from web3.middleware import ( - local_filter_middleware, -) -from web3.providers.eth_tester import ( - EthereumTesterProvider, -) # -*- coding: utf-8 -*- -# Ignore warning in pyethereum 1.6 - will go away with the upgrade -pytestmark = pytest.mark.filterwarnings("ignore:implicit cast from 'char *'") - - -# Ignore warning in pyethereum 1.6 - will go away with the upgrade -pytestmark = pytest.mark.filterwarnings("ignore:implicit cast from 'char *'") - - -@pytest.fixture( - params=[True, False], - ids=["local_filter_middleware", "node_based_filter"]) -def web3(request): - use_filter_middleware = request.param - provider = EthereumTesterProvider() - w3 = Web3(provider) - if use_filter_middleware: - w3.middleware_onion.add(local_filter_middleware) - return w3 - - @pytest.fixture() def math_contract(web3, MathContract, address_conversion_func): deploy_txn = MathContract.constructor().transact() diff --git a/tests/core/filtering/conftest.py b/tests/core/filtering/conftest.py index f0cd8cc23b..a3f4cf4552 100644 --- a/tests/core/filtering/conftest.py +++ b/tests/core/filtering/conftest.py @@ -27,6 +27,7 @@ def tester_snapshot(web3): @pytest.fixture( + scope='function', params=[True, False], ids=["local_filter_middleware", "node_based_filter"]) def web3(request): diff --git a/tests/core/filtering/test_contract_data_filters.py b/tests/core/filtering/test_contract_data_filters.py index 9da071420f..24dfb883f0 100644 --- a/tests/core/filtering/test_contract_data_filters.py +++ b/tests/core/filtering/test_contract_data_filters.py @@ -19,9 +19,6 @@ EthereumTesterProvider, ) -# Ignore warning in pyethereum 1.6 - will go away with the upgrade -pytestmark = pytest.mark.filterwarnings("ignore:implicit cast from 'char *'") - @pytest.fixture( scope="module", diff --git a/tests/core/filtering/test_contract_on_event_filtering.py b/tests/core/filtering/test_contract_on_event_filtering.py index 4e635c2c1a..9c2174d153 100644 --- a/tests/core/filtering/test_contract_on_event_filtering.py +++ b/tests/core/filtering/test_contract_on_event_filtering.py @@ -4,29 +4,6 @@ is_address, ) -from web3 import Web3 -from web3.middleware import ( - local_filter_middleware, -) -from web3.providers.eth_tester import ( - EthereumTesterProvider, -) - -# Ignore warning in pyethereum 1.6 - will go away with the upgrade -pytestmark = pytest.mark.filterwarnings("ignore:implicit cast from 'char *'") - - -@pytest.fixture( - params=[True, False], - ids=["local_filter_middleware", "node_based_filter"]) -def web3(request): - use_filter_middleware = request.param - provider = EthereumTesterProvider() - w3 = Web3(provider) - if use_filter_middleware: - w3.middleware_onion.add(local_filter_middleware) - return w3 - @pytest.mark.parametrize('call_as_instance', (True, False)) def test_create_filter_address_parameter(web3, emitter, Emitter, call_as_instance):