File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed
Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -321,6 +321,17 @@ def test_hardfork(
321321 )
322322
323323
324+ def _get_build_str (build_method : str ) -> str :
325+ if build_method == clusterlib_utils .BuildMethods .BUILD :
326+ return "build"
327+ if build_method == clusterlib_utils .BuildMethods .BUILD_RAW :
328+ return "build_raw"
329+ if build_method == clusterlib_utils .BuildMethods .BUILD_EST :
330+ return "build_estimate"
331+ msg = f"Unsupported build method: { build_method } "
332+ raise ValueError (msg )
333+
334+
324335class TestUpgrade :
325336 """Tests for node upgrade testing."""
326337
@@ -364,13 +375,7 @@ def test_prepare_tx(
364375 be submitted in next node version and/or next era.
365376 """
366377 temp_template = common .get_test_id (cluster )
367- build_str = (
368- "build"
369- if build_method == clusterlib_utils .BuildMethods .BUILD
370- else "build_raw"
371- if build_method == clusterlib_utils .BuildMethods .BUILD_RAW
372- else "build_estimate"
373- )
378+ build_str = _get_build_str (build_method )
374379
375380 src_address = payment_addrs_disposable [0 ].address
376381 dst_address = payment_addrs_disposable [1 ].address
@@ -487,13 +492,7 @@ def test_submit_tx(
487492 ):
488493 """Submit transaction that was created by previous node version and/or in previous era."""
489494 temp_template = common .get_test_id (cluster )
490- build_str = (
491- "build"
492- if build_method == clusterlib_utils .BuildMethods .BUILD
493- else "build_raw"
494- if build_method == clusterlib_utils .BuildMethods .BUILD_RAW
495- else "build_estimate"
496- )
495+ build_str = _get_build_str (build_method )
497496
498497 tx_dir = (
499498 temptools .get_basetemp ()
You can’t perform that action at this time.
0 commit comments