From 11b0f9affce98f6e16955238580cfc830e99267b Mon Sep 17 00:00:00 2001 From: mmsqe Date: Thu, 26 Oct 2023 11:45:36 +0800 Subject: [PATCH] update doc --- integration_tests/test_gov.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/integration_tests/test_gov.py b/integration_tests/test_gov.py index 3a022cd2b..1f8928b53 100644 --- a/integration_tests/test_gov.py +++ b/integration_tests/test_gov.py @@ -334,11 +334,17 @@ def test_host_enabled(cluster): def test_gov_voting(cluster): + """ + - change voting_period from default 10s to 216s + """ cli = cluster.cosmos_cli() - p = cli.query_gov_params() - assert p["voting_params"]["voting_period"] == "10000000000" - print("mm-query_gov_params", p) - voting_period = "21600" + + def assert_voting_period(voting_period_in_s): + p = cli.query_gov_params() + assert p["voting_params"]["voting_period"] == voting_period_in_s + + assert_voting_period("10000000000") + voting_period_in_s = "216000000000" rsp = cluster.gov_propose_legacy( "community", "param-change", @@ -349,12 +355,11 @@ def test_gov_voting(cluster): { "subspace": "gov", "key": "votingparams", - "value": {"voting_period": voting_period}, + "value": {"voting_period": voting_period_in_s}, } ], }, ) assert rsp["code"] == 0, rsp["raw_log"] approve_proposal(cluster, rsp) - p = cli.query_gov_params() - assert p["voting_params"]["voting_period"] == voting_period + assert_voting_period(voting_period_in_s)