From 8d03fd74e7fcdb7c5b51bce6c294870bada9afc5 Mon Sep 17 00:00:00 2001 From: Adal Chiriliuc Date: Wed, 24 Apr 2024 20:00:54 +0300 Subject: [PATCH] nox -s format --- test/integration/test_b2_command_line.py | 15 ++++++++----- test/unit/test_console_tool.py | 27 ++++++++++++++++-------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/test/integration/test_b2_command_line.py b/test/integration/test_b2_command_line.py index a7ff0699..500c4027 100755 --- a/test/integration/test_b2_command_line.py +++ b/test/integration/test_b2_command_line.py @@ -448,7 +448,8 @@ def test_debug_logs(b2_tool, is_running_on_docker, tmp_path): to_be_removed_bucket_name = b2_tool.generate_bucket_name() b2_tool.should_succeed( [ - 'bucket', 'create', + 'bucket', + 'create', to_be_removed_bucket_name, 'allPublic', *b2_tool.get_bucket_info_args(), @@ -1428,7 +1429,8 @@ def test_default_sse_b2__create_bucket(b2_tool, schedule_bucket_cleanup): schedule_bucket_cleanup(second_bucket_name) b2_tool.should_succeed( [ - 'bucket', 'create', + 'bucket', + 'create', '--default-server-side-encryption=SSE-B2', second_bucket_name, 'allPublic', @@ -2518,7 +2520,8 @@ def test_replication_basic(b2_tool, bucket_name, schedule_bucket_cleanup): schedule_bucket_cleanup(source_bucket_name) b2_tool.should_succeed( [ - 'bucket', 'create', + 'bucket', + 'create', source_bucket_name, 'allPublic', '--replication', @@ -2603,7 +2606,8 @@ def base_test_replication_setup(b2_tool, bucket_name, schedule_bucket_cleanup, u schedule_bucket_cleanup(source_bucket_name) b2_tool.should_succeed( [ - 'bucket', 'create', + 'bucket', + 'create', source_bucket_name, 'allPublic', '--file-lock-enabled', @@ -2747,7 +2751,8 @@ def test_replication_monitoring(b2_tool, bucket_name, sample_file, schedule_buck schedule_bucket_cleanup(source_bucket_name) b2_tool.should_succeed( [ - 'bucket', 'create', + 'bucket', + 'create', source_bucket_name, 'allPublic', '--file-lock-enabled', diff --git a/test/unit/test_console_tool.py b/test/unit/test_console_tool.py index b4a54052..7093f0ff 100644 --- a/test/unit/test_console_tool.py +++ b/test/unit/test_console_tool.py @@ -322,17 +322,23 @@ def test_camel_case_supported_in_v3(self): 'bucket_0\n', '', 0 ) self._run_command( - ['bucket', 'create', 'my-bucket-kebab', '--bucket-info', '{"xxx": "123"}', 'allPrivate'], - 'bucket_1\n', '', 0 + [ + 'bucket', 'create', 'my-bucket-kebab', '--bucket-info', '{"xxx": "123"}', + 'allPrivate' + ], 'bucket_1\n', '', 0 ) @pytest.mark.apiver(from_ver=4) def test_camel_case_not_supported_in_v4(self): self._authorize_account() - self._run_command(['bucket', 'create', 'my-bucket', '--bucketInfo', 'allPrivate'], '', '', 2) self._run_command( - ['bucket', 'create', 'my-bucket-kebab', '--bucket-info', '{"xxx": "123"}', 'allPrivate'], - 'bucket_0\n', '', 0 + ['bucket', 'create', 'my-bucket', '--bucketInfo', 'allPrivate'], '', '', 2 + ) + self._run_command( + [ + 'bucket', 'create', 'my-bucket-kebab', '--bucket-info', '{"xxx": "123"}', + 'allPrivate' + ], 'bucket_0\n', '', 0 ) def test_create_key_and_authorize_with_it(self): @@ -489,8 +495,8 @@ def test_create_bucket__with_lifecycle_rules(self): ) self._run_command( - ['bucket', 'create', 'my-bucket', 'allPrivate', '--lifecycle-rules', rules], 'bucket_0\n', - '', 0 + ['bucket', 'create', 'my-bucket', 'allPrivate', '--lifecycle-rules', rules], + 'bucket_0\n', '', 0 ) def test_create_bucket__mutually_exclusive_lifecycle_rules_options(self): @@ -608,7 +614,9 @@ def test_buckets(self): # Make a bucket with an illegal name expected_stdout = 'ERROR: Bad request: illegal bucket name: bad/bucket/name\n' - self._run_command(['bucket', 'create', 'bad/bucket/name', 'allPublic'], '', expected_stdout, 1) + self._run_command( + ['bucket', 'create', 'bad/bucket/name', 'allPublic'], '', expected_stdout, 1 + ) # Make two buckets self._run_command(['bucket', 'create', 'my-bucket', 'allPrivate'], 'bucket_0\n', '', 0) @@ -862,7 +870,8 @@ def test_keys(self): self._run_command(['account', 'authorize', 'appKeyId1', 'appKey1'], None, '', 0) self._run_command( - ['bucket', 'list'], '', 'ERROR: Application key is restricted to bucket: my-bucket-a\n', 1 + ['bucket', 'list'], '', 'ERROR: Application key is restricted to bucket: my-bucket-a\n', + 1 ) self._run_command( ['bucket', 'get', 'my-bucket-c'], '',