File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,19 @@ def deployment(new_deployment: Deployment) -> Deployment:
46
46
class MockWeb3 (Web3 ):
47
47
def __init__ (self , provider : BaseProvider ):
48
48
super ().__init__ (provider )
49
- accounts_mock = PropertyMock ( return_value = [
49
+ self . _accounts = [
50
50
"0x50FF810797f75f6bfbf2227442e0c961a8562F4C" ,
51
51
"0x9e1FfFaBdC50e54e030F6E5F7fC27c7Dd22a3F4e" ,
52
52
"0x5BEB2D3aA2333A524703Af18310AcFf462c04723" ,
53
53
"0x7fBe5C7C4E7a8B52b8aAA44425Fc1c0d0e72c2AA"
54
- ])
55
- type(self ).eth = PropertyMock (accounts = accounts_mock )
56
-
54
+ ]
55
+
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
57
62
58
63
@pytest .fixture (scope = "session" )
59
64
def web3 () -> Web3 :
You can’t perform that action at this time.
0 commit comments