Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adal-chiriliuc-reef committed Apr 30, 2024
1 parent 429a500 commit a3e8908
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions test/unit/test_console_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,11 @@ def test_get_download_auth_url_with_encoding(self):
def test_list_unfinished_large_files_with_none(self):
self._authorize_account()
self._create_my_bucket()
self._run_command(['list-unfinished-large-files', 'my-bucket'], '', '', 0)
self._run_command(
['list-unfinished-large-files', 'my-bucket'], '',
'WARNING: `list-unfinished-large-files` command is deprecated. Use `file large unfinished list` instead.\n',
0
)

def test_upload_large_file(self):
self._authorize_account()
Expand Down Expand Up @@ -2992,7 +2996,11 @@ def setUp(self):

def test_cancel_large_file(self):
file = self.v1_bucket.start_large_file('file1', 'text/plain', {})
self._run_command(['cancel-large-file', file.file_id], '9999 canceled\n', '', 0)
self._run_command(
['cancel-large-file', file.file_id], '9999 canceled\n',
'WARNING: `cancel-large-file` command is deprecated. Use `file large unfinished cancel` instead.\n',
0
)

def test_cancel_all_large_file(self):
self.v1_bucket.start_large_file('file1', 'text/plain', {})
Expand All @@ -3003,12 +3011,17 @@ def test_cancel_all_large_file(self):
'''

self._run_command(
['cancel-all-unfinished-large-files', 'my-v1-bucket'], expected_stdout, '', 0
['cancel-all-unfinished-large-files', 'my-v1-bucket'], expected_stdout,
'WARNING: `cancel-all-unfinished-large-files` command is deprecated. Use `file large unfinished cancel` instead.\n',
0
)

def test_list_parts_with_none(self):
file = self.v1_bucket.start_large_file('file', 'text/plain', {})
self._run_command(['list-parts', file.file_id], '', '', 0)
self._run_command(
['list-parts', file.file_id], '',
'WARNING: `list-parts` command is deprecated. Use `file large parts` instead.\n', 0
)

def test_list_parts_with_parts(self):

Expand All @@ -3030,7 +3043,10 @@ def test_list_parts_with_parts(self):
3 11 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed
'''

self._run_command(['list-parts', file.file_id], expected_stdout, '', 0)
self._run_command(
['list-parts', file.file_id], expected_stdout,
'WARNING: `list-parts` command is deprecated. Use `file large parts` instead.\n', 0
)

def test_list_unfinished_large_files_with_some(self):
api_url = self.account_info.get_api_url()
Expand All @@ -3048,7 +3064,11 @@ def test_list_unfinished_large_files_with_some(self):
9997 file3 application/json
'''

self._run_command(['list-unfinished-large-files', 'my-bucket'], expected_stdout, '', 0)
self._run_command(
['list-unfinished-large-files', 'my-bucket'], expected_stdout,
'WARNING: `list-unfinished-large-files` command is deprecated. Use `file large unfinished list` instead.\n',
0
)


class TestRmConsoleTool(BaseConsoleToolTest):
Expand Down

0 comments on commit a3e8908

Please sign in to comment.