diff --git a/integration_tests/test_gov.py b/integration_tests/test_gov.py index edebc944a..e9b8e1248 100644 --- a/integration_tests/test_gov.py +++ b/integration_tests/test_gov.py @@ -222,7 +222,7 @@ def test_inherit_vote(cluster, tmp_path): def test_host_enabled(cluster, tmp_path): cli = cluster.cosmos_cli() - p = cluster.cosmos_cli().query_host_params() + p = cli.query_host_params() assert p["host_enabled"] p["host_enabled"] = False proposal = tmp_path / "proposal.json" @@ -247,3 +247,35 @@ def test_host_enabled(cluster, tmp_path): approve_proposal(cluster, rsp, msg=msg) p = cli.query_host_params() assert not p["host_enabled"] + + +def test_gov_voting(cluster, tmp_path): + """ + - change voting_period from default 10s to 3m36s + """ + cli = cluster.cosmos_cli() + p = cli.query_params("gov") + assert p["params"]["voting_period"] == "10s" + updated = "3m36s" + p["params"]["voting_period"] = updated + proposal = tmp_path / "proposal.json" + authority = module_address("gov") + type = "/cosmos.gov.v1.MsgUpdateParams" + proposal_src = { + "messages": [ + { + "@type": type, + "authority": authority, + "params": p["params"], + } + ], + "deposit": "10000000basecro", + "title": "title", + "summary": "summary", + } + proposal.write_text(json.dumps(proposal_src)) + rsp = cluster.submit_gov_proposal(proposal, from_="community") + assert rsp["code"] == 0, rsp["raw_log"] + approve_proposal(cluster, rsp, msg=f",{type}") + p = cli.query_params("gov") + assert p["params"]["voting_period"] == updated