From 04472020ba65dafc23d405cd5eae59a0b4969870 Mon Sep 17 00:00:00 2001 From: Martin Kourim Date: Wed, 2 Oct 2024 14:36:20 +0200 Subject: [PATCH] refactor(tests): simplify address creation in test_blocks Simplified the creation of payment addresses in TestDynamicBlockProd by removing the use of fixture_cache. The caching is not needed as the fixture is used by single test. --- cardano_node_tests/tests/test_blocks.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/cardano_node_tests/tests/test_blocks.py b/cardano_node_tests/tests/test_blocks.py index ec04f285c..c0ebaa16b 100644 --- a/cardano_node_tests/tests/test_blocks.py +++ b/cardano_node_tests/tests/test_blocks.py @@ -390,17 +390,12 @@ def payment_addrs( """Create new payment addresses.""" cluster = cluster_singleton - with cluster_manager.cache_fixture() as fixture_cache: - if fixture_cache.value: - return fixture_cache.value # type: ignore - - addrs = clusterlib_utils.create_payment_addr_records( - *[f"addr_dyn_prod_ci{cluster_manager.cluster_instance_num}_{i}" for i in range(20)], - cluster_obj=cluster, - ) - fixture_cache.value = addrs + addrs = clusterlib_utils.create_payment_addr_records( + *[f"addr_dyn_prod_ci{cluster_manager.cluster_instance_num}_{i}" for i in range(20)], + cluster_obj=cluster, + ) - # fund source addresses + # Fund source addresses clusterlib_utils.fund_from_faucet( *addrs, cluster_obj=cluster,