diff --git a/test/unit/test_console_tool.py b/test/unit/test_console_tool.py index c58359bf8..fdfc3f4a5 100644 --- a/test/unit/test_console_tool.py +++ b/test/unit/test_console_tool.py @@ -1117,7 +1117,7 @@ def test_download_by_name_1_thread(self): def test_download_by_name_10_threads(self): self._test_download_threads(download_by='name', num_threads=10) - def _test_download_to_directory(self, download_by): + def _test_download_to_directory(self, download_by: str): self._authorize_account() self._create_my_bucket() @@ -1134,30 +1134,24 @@ def _test_download_to_directory(self, download_by): remove_version=True, ) + b2uri = f'b2://my-bucket/{source_filename}' if download_by == 'name' else 'b2id://9999' command = [ - 'download-file-by-%s' % download_by, + 'download-file', '--noProgress', + b2uri, ] - command += ['9999'] if download_by == 'id' else ['my-bucket', source_filename] + target_directory = os.path.join(temp_dir, 'target') os.mkdir(target_directory) command += [target_directory] - self._run_command( - command, - expected_stderr= - f'WARNING: download-file-by-{download_by} command is deprecated. Use download-file instead.\n' - ) + self._run_command(command) self.assertEqual( local_file_content, self._read_file(os.path.join(target_directory, source_filename)) ) # Download the file second time, to check the override behavior. - self._run_command( - command, - expected_stderr= - f'WARNING: download-file-by-{download_by} command is deprecated. Use download-file instead.\n' - ) + self._run_command(command) # We should get another file. target_directory_files = [ elem