From b9a6c65ad6b8e50097dc4fe4db3f4a45b0e6119d Mon Sep 17 00:00:00 2001 From: Peter Ondrejka Date: Wed, 17 Apr 2024 14:06:07 +0200 Subject: [PATCH] partition table fix --- tests/foreman/cli/test_partitiontable.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/foreman/cli/test_partitiontable.py b/tests/foreman/cli/test_partitiontable.py index 35e52cbbe65..d71a7256cdf 100644 --- a/tests/foreman/cli/test_partitiontable.py +++ b/tests/foreman/cli/test_partitiontable.py @@ -53,7 +53,7 @@ def test_positive_create_with_one_character_name(self, name, target_sat): strict=True, ) ) - ) + ), ) def test_positive_crud_with_name(self, name, new_name, module_target_sat): """Create, read, update and delete Partition Tables with different names @@ -86,7 +86,9 @@ def test_positive_create_with_content(self, module_target_sat): :CaseImportance: Critical """ content = 'Fake ptable' - ptable = module_target_sat.cli_factory.make_partition_table({'content': content}) + filename = gen_string('alpha', 10) + module_target_sat.execute(f'echo {content} > {filename}') + ptable = module_target_sat.cli_factory.make_partition_table({'file': filename}) ptable_content = module_target_sat.cli.PartitionTable().dump({'id': ptable['id']}) assert content in ptable_content @@ -102,7 +104,9 @@ def test_positive_create_with_content_length(self, module_target_sat): :BZ: 1270181 """ content = gen_string('alpha', 5000) - ptable = module_target_sat.cli_factory.make_partition_table({'content': content}) + filename = gen_string('alpha', 10) + module_target_sat.execute(f'echo {content} > {filename}') + ptable = module_target_sat.cli_factory.make_partition_table({'file': filename}) ptable_content = module_target_sat.cli.PartitionTable().dump({'id': ptable['id']}) assert content in ptable_content