Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
drelu authored and kclowes committed Apr 8, 2019
1 parent ea1e9e5 commit be1d573
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions web3/_utils/module_testing/parity_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,13 @@ def test_trace_filter(self, web3, txn_filter_params, parity_fixture_data):
trace = web3.parity.traceFilter(txn_filter_params)
assert isinstance(trace, list)
assert trace[0]['action']['from'] == add_0x_prefix(parity_fixture_data['coinbase'])


@pytest.mark.parametrize(
'params',
['enode://f1a6b0bdbf014355587c3018454d070ac57801f05d3b39fe85da574f002a32e929f683d72aa5a8318382e4d3c7a05c9b91687b0d997a39619fb8a6e7ad88e512@1.1.1.1:30300']
)
def test_add_reserved_peer(self, web3, params):
response = web3.parity.addReservedPeer(params)
assert response["result"]==True

2 changes: 1 addition & 1 deletion web3/parity.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def netPeers(self):
"parity_netPeers",
[],
)

def addReservedPeer(self, params):
return self.web3.manager.request_blocking(
"parity_addReservedPeer",
Expand Down

0 comments on commit be1d573

Please sign in to comment.