diff --git a/test/unit/console_tool/test_download_file.py b/test/unit/console_tool/test_download_file.py index ccac10028..a2a82f80c 100644 --- a/test/unit/console_tool/test_download_file.py +++ b/test/unit/console_tool/test_download_file.py @@ -16,7 +16,7 @@ EXPECTED_STDOUT_DOWNLOAD = ''' File name: file1.txt File id: 9999 -Output file path: {} +Output file path: {output_path} File size: 11 Content type: b2/x-auto Content sha1: 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed @@ -42,7 +42,7 @@ def test_download_file_by_uri__flag_support(b2_cli, uploaded_file, tmp_path, fla b2_cli.run( ['download-file', flag, 'b2id://9999', str(output_path)], - expected_stdout=expected_stdout.format(pathlib.Path(output_path).resolve()) + expected_stdout=expected_stdout.format(output_path=pathlib.Path(output_path).resolve()) ) assert output_path.read_text() == uploaded_file['content'] @@ -56,7 +56,9 @@ def test_download_file_by_uri__b2_uri_support(b2_cli, uploaded_file, tmp_path, b b2_cli.run( ['download-file', b2_uri, str(output_path)], - expected_stdout=EXPECTED_STDOUT_DOWNLOAD.format(pathlib.Path(output_path).resolve()) + expected_stdout=EXPECTED_STDOUT_DOWNLOAD.format( + output_path=pathlib.Path(output_path).resolve() + ) ) assert output_path.read_text() == uploaded_file['content'] @@ -76,7 +78,9 @@ def test_download_file_by_name(b2_cli, local_file, uploaded_file, tmp_path, flag 'download-file-by-name', uploaded_file['bucket'], uploaded_file['fileName'], str(output_path) ], - expected_stdout=EXPECTED_STDOUT_DOWNLOAD.format(pathlib.Path(output_path).resolve()), + expected_stdout=EXPECTED_STDOUT_DOWNLOAD.format( + output_path=pathlib.Path(output_path).resolve() + ), expected_stderr= 'WARNING: download-file-by-name command is deprecated. Use download-file instead.\n', ) @@ -95,7 +99,7 @@ def test_download_file_by_id(b2_cli, uploaded_file, tmp_path, flag, expected_std b2_cli.run( ['download-file-by-id', flag, '9999', str(output_path)], - expected_stdout=expected_stdout.format(pathlib.Path(output_path).resolve()), + expected_stdout=expected_stdout.format(output_path=pathlib.Path(output_path).resolve()), expected_stderr= 'WARNING: download-file-by-id command is deprecated. Use download-file instead.\n', ) @@ -123,7 +127,9 @@ def reader(): uploaded_file['fileName'], str(output_path) ], - expected_stdout=EXPECTED_STDOUT_DOWNLOAD.format(pathlib.Path(output_path).resolve()), + expected_stdout=EXPECTED_STDOUT_DOWNLOAD.format( + output_path=pathlib.Path(output_path).resolve() + ), expected_stderr= 'WARNING: download-file-by-name command is deprecated. Use download-file instead.\n', ) diff --git a/test/unit/test_console_tool.py b/test/unit/test_console_tool.py index 63a5430f1..0c64ad5f2 100644 --- a/test/unit/test_console_tool.py +++ b/test/unit/test_console_tool.py @@ -976,7 +976,7 @@ def test_files_encrypted(self): expected_stdout_template = ''' File name: file1.txt File id: 9999 - Output file path: {} + Output file path: {output_path} File size: 11 Content type: b2/x-auto Content sha1: 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed @@ -988,7 +988,7 @@ def test_files_encrypted(self): Download finished ''' expected_stdout = expected_stdout_template.format( - pathlib.Path(local_download1).resolve() + output_path=pathlib.Path(local_download1).resolve() ) self._run_command( @@ -1001,7 +1001,7 @@ def test_files_encrypted(self): # Download file by ID. (Same expected output as downloading by name) local_download2 = os.path.join(temp_dir, 'download2.txt') expected_stdout = expected_stdout_template.format( - pathlib.Path(local_download2).resolve() + output_path=pathlib.Path(local_download2).resolve() ) self._run_command( ['download-file', '--noProgress', 'b2id://9999', local_download2], expected_stdout,