diff --git a/python/tests/async_tests/test_pubsub.py b/python/tests/async_tests/test_pubsub.py index bfd8a265d8..cd5d604e8a 100644 --- a/python/tests/async_tests/test_pubsub.py +++ b/python/tests/async_tests/test_pubsub.py @@ -1205,20 +1205,20 @@ async def test_pubsub_combined_exact_pattern_and_sharded_one_client( # Create dictionaries of channels and their corresponding messages exact_channels_and_messages = { - "{{{}}}:{}".format("channel", get_random_string(5)): get_random_string( + "{{{}}}:{}:{}".format("channel", get_random_string(5), i): get_random_string( 10 ) - for _ in range(NUM_CHANNELS) + for i in range(NUM_CHANNELS) } pattern_channels_and_messages = { - "{{{}}}:{}".format("pattern", get_random_string(5)): get_random_string( + "{{{}}}:{}:{}".format("pattern", get_random_string(5), i): get_random_string( 5 ) - for _ in range(NUM_CHANNELS) + for i in range(NUM_CHANNELS) } sharded_channels_and_messages = { - f"{SHARD_PREFIX}: {get_random_string(10)}": get_random_string(7) - for _ in range(NUM_CHANNELS) + f"{SHARD_PREFIX}:{i}:{get_random_string(10)}": get_random_string(7) + for i in range(NUM_CHANNELS) } publish_response = 1