-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
common.py
97 lines (75 loc) · 3.99 KB
/
common.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import pytest
from web3._utils.module_testing import ( # noqa: F401
EthModuleTest,
GoEthereumPersonalModuleTest,
GoEthereumShhModuleTest,
NetModuleTest,
VersionModuleTest,
Web3ModuleTest,
)
class GoEthereumTest(Web3ModuleTest):
def _check_web3_clientVersion(self, client_version):
assert client_version.startswith('Geth/')
class GoEthereumEthModuleTest(EthModuleTest):
def test_eth_replaceTransaction(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction(web3, unlocked_account)
def test_eth_replaceTransaction_incorrect_nonce(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_incorrect_nonce(web3, unlocked_account)
def test_eth_replaceTransaction_gas_price_too_low(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_too_low(web3, unlocked_account)
def test_eth_replaceTransaction_gas_price_defaulting_minimum(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_defaulting_minimum(web3, unlocked_account)
def test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(self,
web3,
unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_defaulting_strategy_higher(
web3, unlocked_account
)
def test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(self,
web3,
unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_replaceTransaction_gas_price_defaulting_strategy_lower(
web3, unlocked_account
)
def test_eth_modifyTransaction(self, web3, unlocked_account):
pytest.xfail('Needs ability to efficiently control mining')
super().test_eth_modifyTransaction(web3, unlocked_account)
def test_eth_estimateGas_with_block(self,
web3,
unlocked_account_dual_type):
pytest.xfail('Block identifier has not been implemented in geth')
super().test_eth_estimateGas_with_block(
web3, unlocked_account_dual_type
)
def test_eth_submitHashrate(self, web3):
if 'v1.8.22' in web3.clientVersion:
# https://github.com/ethereum/go-ethereum/commit/51db5975cc5fb88db6a0dba1826b534fd4df29d7
pytest.xfail('eth_submitHashrate deprecated in 1.8.22 for ethash_submitHashRate')
super().test_eth_submitHashrate(web3)
def test_eth_chainId(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('eth_chainId not implemented in geth 1.7.2')
super().test_eth_chainId(web3)
class GoEthereumVersionModuleTest(VersionModuleTest):
pass
class GoEthereumNetModuleTest(NetModuleTest):
pass
class CommonGoEthereumShhModuleTest(GoEthereumShhModuleTest):
def test_shh_sync_filter(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('Whisper version 6 not supported in geth 1.7.2')
super().test_shh_sync_filter(web3)
def test_shh_async_filter(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('Whisper version 6 not supported in geth 1.7.2')
super().test_shh_async_filter(web3)
def test_shh_post(self, web3):
if 'v1.7.2' in web3.clientVersion:
pytest.xfail('Whisper version 6 not supported in geth 1.7.2')
super().test_shh_post(web3)