From 00e5bbc744160ef72246a1a3d0e1a06188192d20 Mon Sep 17 00:00:00 2001 From: Hang Su Date: Wed, 26 Apr 2023 17:01:03 -0400 Subject: [PATCH] power pack checking --- tests/steps/other_v2_steps.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/steps/other_v2_steps.py b/tests/steps/other_v2_steps.py index c1dbd774..13b17655 100644 --- a/tests/steps/other_v2_steps.py +++ b/tests/steps/other_v2_steps.py @@ -1494,6 +1494,19 @@ def attach_sim_request_to_txn_group_simulation(context): ) +@then('the simulation with "{power}" should not have failure message.') +def power_pack_simulation_should_pass(context, power: str): + packs = power.split(",") + if len(packs) > 0: + assert context.simulate_response.eval_overrides + + if "allow-more-logging" in packs: + assert context.simulate_response.eval_overrides.max_log_calls + assert context.simulate_response.eval_overrides.max_log_size + + assert len(context.simulate_response.failure_message) == 0 + + @when("I prepare the transaction without signatures for simulation") def step_impl(context): context.stx = transaction.SignedTransaction(context.txn, None)