Skip to content

Commit

Permalink
Fix python linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-scherbina committed Apr 9, 2024
1 parent 5a17ea8 commit 5dc8bab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions tests/integration_tests/test_grpc_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def expect_cb(rsp):
"--grpc-only",
"--home",
custom_ethermint.base_dir / "node1",
],
],
stdout=logfile,
stderr=subprocess.STDOUT,
)
Expand Down Expand Up @@ -152,4 +152,3 @@ def expect_cb(rsp):
finally:
proc.terminate()
proc.wait()

6 changes: 1 addition & 5 deletions tests/integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
import time
import configparser
import json
import re
import subprocess
import time
from pathlib import Path

import pytest
from dateutil.parser import isoparse
from pystarport import ports
from pystarport.cluster import SUPERVISOR_CONFIG_FILE

from .network import Ethermint, setup_custom_ethermint
from .utils import (
ADDRS,
CONTRACTS,
find_log_event_attrs,
approve_proposal,
deploy_contract,
parse_events,
send_transaction,
wait_for_block,
wait_for_block_time,
wait_for_port,
)

Expand Down
4 changes: 3 additions & 1 deletion tests/integration_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,13 @@ def find_log_event_attrs(events, ev_type, cond=None):
return attrs
return None


def approve_proposal(n, rsp, status="PROPOSAL_STATUS_PASSED"):
cli = n.cosmos_cli()

# get proposal_id
tx = cli.query_tx("hash", rsp["txhash"])

def cb(attrs):
return "proposal_id" in attrs
ev = find_log_event_attrs(tx["logs"][0]["events"], "submit_proposal", cb)
Expand All @@ -226,7 +228,7 @@ def cb(attrs):
res = cli.query_tally(proposal_id)
res = res.get("tally") or res
assert (
int(res["yes_count"]) == cli.staking_pool()
int(res["yes_count"]) == cli.staking_pool()
), "all validators should have voted yes"
print("wait for proposal to be activated")
proposal = cli.query_proposal(proposal_id)
Expand Down

0 comments on commit 5dc8bab

Please sign in to comment.