diff --git a/newsfragments/2580.feature.rst b/newsfragments/2580.feature.rst index b9062dfa34..26b12fbf0f 100644 --- a/newsfragments/2580.feature.rst +++ b/newsfragments/2580.feature.rst @@ -1 +1 @@ -Moved `Eth.account` to BaseEth.account so that it could be use in `AsyncEth` \ No newline at end of file +Moved `Eth.account` to `BaseEth.account` so that it could be use in `AsyncEth` diff --git a/tests/core/eth-module/test_accounts.py b/tests/core/eth-module/test_accounts.py index 3432369619..1d3e755d25 100644 --- a/tests/core/eth-module/test_accounts.py +++ b/tests/core/eth-module/test_accounts.py @@ -102,21 +102,6 @@ def w3(): return Web3(EthereumTesterProvider()) -@pytest.fixture() -def async_w3(): - return Web3(AsyncEthereumTesterProvider(), modules={"eth": [AsyncEth]}) - - -def test_blocking_eth_account(w3): - account = w3.eth.account.create() - assert account is not None - - -def test_async_eth_account(async_w3): - account = async_w3.eth.account.create() - assert account is not None - - def test_eth_account_create_variation(acct): account1 = acct.create() account2 = acct.create() @@ -567,6 +552,14 @@ def test_eth_account_sign_and_send_EIP155_transaction_to_eth_tester( assert actual_txn.v == v +# -- async -- # + + +@pytest.fixture() +def async_w3(): + return Web3(AsyncEthereumTesterProvider(), modules={"eth": [AsyncEth]}) + + @patch("web3.eth.BaseEth.account", "wired via BaseEth") def test_account_is_wired_via_base_eth_for_sync_and_async(w3, async_w3): # this gives us some comfort that all the `w3` tests would apply for `async_w3` as