From a68328dd5b82b8a4684bbf7e10b5ecbc0a81b02c Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Wed, 3 Jul 2024 06:12:17 -0700 Subject: [PATCH 1/8] test: Improve term of service test reliability (box/box-codegen#522) --- .codegen.json | 2 +- docs/terms_of_services.md | 2 +- test/terms_of_services.py | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.codegen.json b/.codegen.json index 2855d76c..04071b88 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "62a25a4", "specHash": "e95d6fa", "version": "1.1.0" } +{ "engineHash": "5a07c4a", "specHash": "e95d6fa", "version": "1.1.0" } diff --git a/docs/terms_of_services.md b/docs/terms_of_services.md index 9fcc4095..0efe617f 100644 --- a/docs/terms_of_services.md +++ b/docs/terms_of_services.md @@ -109,7 +109,7 @@ See the endpoint docs at ```python client.terms_of_services.update_terms_of_service_by_id( - tos.id, UpdateTermsOfServiceByIdStatus.DISABLED.value, "Disabled TOS" + tos.id, UpdateTermsOfServiceByIdStatus.DISABLED.value, "Updated TOS" ) ``` diff --git a/test/terms_of_services.py b/test/terms_of_services.py index 83f02276..65bf7168 100644 --- a/test/terms_of_services.py +++ b/test/terms_of_services.py @@ -19,17 +19,17 @@ def testGetTermsOfServices(): tos: TermsOfService = get_or_create_terms_of_services() updated_tos_1: TermsOfService = ( client.terms_of_services.update_terms_of_service_by_id( - tos.id, UpdateTermsOfServiceByIdStatus.ENABLED.value, 'Enabled TOS' + tos.id, UpdateTermsOfServiceByIdStatus.DISABLED.value, 'TOS' ) ) - assert to_string(updated_tos_1.status) == 'enabled' - assert updated_tos_1.text == 'Enabled TOS' + assert to_string(updated_tos_1.status) == 'disabled' + assert updated_tos_1.text == 'TOS' updated_tos_2: TermsOfService = ( client.terms_of_services.update_terms_of_service_by_id( - tos.id, UpdateTermsOfServiceByIdStatus.DISABLED.value, 'Disabled TOS' + tos.id, UpdateTermsOfServiceByIdStatus.DISABLED.value, 'Updated TOS' ) ) assert to_string(updated_tos_2.status) == 'disabled' - assert updated_tos_2.text == 'Disabled TOS' + assert updated_tos_2.text == 'Updated TOS' list_tos: TermsOfServices = client.terms_of_services.get_terms_of_service() assert list_tos.total_count > 0 From 02adc44e4c2241756ccd608412d4720d6143a479 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Thu, 4 Jul 2024 07:30:35 -0700 Subject: [PATCH 2/8] chore: Update .codegen.json with commit hash of codegen and openapi spec --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 04071b88..7986f731 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "5a07c4a", "specHash": "e95d6fa", "version": "1.1.0" } +{ "engineHash": "ef31179", "specHash": "e95d6fa", "version": "1.1.0" } From 125da0dd4a935a98914e90397a3d0e3e43c9d91a Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Thu, 4 Jul 2024 11:41:39 -0700 Subject: [PATCH 3/8] chore: Update .codegen.json with commit hash of codegen and openapi spec --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 7986f731..953a0f1b 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "ef31179", "specHash": "e95d6fa", "version": "1.1.0" } +{ "engineHash": "f9e3f29", "specHash": "e95d6fa", "version": "1.1.0" } From 6cd3981466c92b56c39f81a73723d6686107ed8f Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Fri, 5 Jul 2024 03:12:03 -0700 Subject: [PATCH 4/8] chore: Update .codegen.json with commit hash of codegen and openapi spec --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 953a0f1b..3a060a63 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "f9e3f29", "specHash": "e95d6fa", "version": "1.1.0" } +{ "engineHash": "ae7e03e", "specHash": "e95d6fa", "version": "1.1.0" } From 3ff8786fd176d8a80f629392f2877fbf454e1c65 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 8 Jul 2024 02:41:27 -0700 Subject: [PATCH 5/8] fix: Update chunked upload (box/box-codegen#523) --- .codegen.json | 2 +- box_sdk_gen/internal/utils.py | 4 +++- box_sdk_gen/managers/chunked_uploads.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.codegen.json b/.codegen.json index 3a060a63..29c21a7b 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "ae7e03e", "specHash": "e95d6fa", "version": "1.1.0" } +{ "engineHash": "89557a9", "specHash": "e95d6fa", "version": "1.1.0" } diff --git a/box_sdk_gen/internal/utils.py b/box_sdk_gen/internal/utils.py index 4e87acee..85ac81d6 100644 --- a/box_sdk_gen/internal/utils.py +++ b/box_sdk_gen/internal/utils.py @@ -152,7 +152,9 @@ def hex_to_base_64(data: hex): Accumulator = TypeVar('Accumulator') -def iterate_chunks(stream: ByteStream, chunk_size: int) -> Iterable[ByteStream]: +def iterate_chunks( + stream: ByteStream, chunk_size: int, file_size: int +) -> Iterable[ByteStream]: stream_is_finished = False while not stream_is_finished: copied_length = 0 diff --git a/box_sdk_gen/managers/chunked_uploads.py b/box_sdk_gen/managers/chunked_uploads.py index 000b2ae5..417320d0 100644 --- a/box_sdk_gen/managers/chunked_uploads.py +++ b/box_sdk_gen/managers/chunked_uploads.py @@ -532,7 +532,7 @@ def upload_big_file( assert part_size * total_parts >= file_size assert upload_session.num_parts_processed == 0 file_hash: Hash = Hash(algorithm=HashName.SHA1.value) - chunks_iterator: Iterator = iterate_chunks(file, part_size) + chunks_iterator: Iterator = iterate_chunks(file, part_size, file_size) results: _PartAccumulator = reduce_iterator( chunks_iterator, self._reducer, From 5ae69aecad690bdca9eba49db59585c163924e7c Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 8 Jul 2024 07:12:23 -0700 Subject: [PATCH 6/8] chore: Update .codegen.json with commit hash of codegen and openapi spec --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 29c21a7b..b04fe144 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "89557a9", "specHash": "e95d6fa", "version": "1.1.0" } +{ "engineHash": "8ad81db", "specHash": "e95d6fa", "version": "1.1.0" } From 5c53748945baa30b7e9efeaeff7545613bb36eb8 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Thu, 11 Jul 2024 08:42:54 -0700 Subject: [PATCH 7/8] chore: Update .codegen.json with commit hash of codegen and openapi spec --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index b04fe144..73e9728a 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "8ad81db", "specHash": "e95d6fa", "version": "1.1.0" } +{ "engineHash": "65ccde4", "specHash": "e95d6fa", "version": "1.1.0" } From 7dcf4f1548eab0062579cb726a61bdc2ac08c82a Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 16 Jul 2024 03:41:52 -0700 Subject: [PATCH 8/8] chore: Update .codegen.json with commit hash of codegen and openapi spec --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 73e9728a..2838a89d 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "65ccde4", "specHash": "e95d6fa", "version": "1.1.0" } +{ "engineHash": "25c4224", "specHash": "e95d6fa", "version": "1.1.0" }