We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7d8434c commit e55f3a9Copy full SHA for e55f3a9
tests/conftest.py
@@ -46,14 +46,19 @@ def deployment(new_deployment: Deployment) -> Deployment:
46
class MockWeb3(Web3):
47
def __init__(self, provider: BaseProvider):
48
super().__init__(provider)
49
- accounts_mock = PropertyMock(return_value=[
+ self._accounts = [
50
"0x50FF810797f75f6bfbf2227442e0c961a8562F4C",
51
"0x9e1FfFaBdC50e54e030F6E5F7fC27c7Dd22a3F4e",
52
"0x5BEB2D3aA2333A524703Af18310AcFf462c04723",
53
"0x7fBe5C7C4E7a8B52b8aAA44425Fc1c0d0e72c2AA"
54
- ])
55
- type(self).eth = PropertyMock(accounts=accounts_mock)
56
-
+ ]
+
+ @property
57
+ def eth(self):
58
+ eth_mock = MagicMock()
59
+ accounts_mock = PropertyMock(return_value=self._accounts)
60
+ type(eth_mock).accounts = accounts_mock
61
+ return eth_mock
62
63
@pytest.fixture(scope="session")
64
def web3() -> Web3:
0 commit comments