From 9f6e3b18bd328c9db959f5204ae4ae1d2d5272dc Mon Sep 17 00:00:00 2001 From: Jonathan Green Date: Wed, 11 Sep 2024 12:33:10 -0300 Subject: [PATCH] Cleanup --- tests/manager/marc/test_uploader.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/manager/marc/test_uploader.py b/tests/manager/marc/test_uploader.py index 3a28fdb23..d2f688050 100644 --- a/tests/manager/marc/test_uploader.py +++ b/tests/manager/marc/test_uploader.py @@ -344,6 +344,7 @@ def test_real_storage_service( s3_service = s3_service_integration_fixture.public uploads = MarcFileUploadSession(redis_fixture.client, 99) uploader = MarcUploadManager(s3_service, uploads) + batch_size = s3_service.MINIMUM_MULTIPART_UPLOAD_SIZE + 1 with uploader.begin() as locked: assert locked @@ -361,8 +362,6 @@ def test_real_storage_service( # is called, there is data in the buffer, so a final part needs to be # uploaded (test3). - batch_size = s3_service.MINIMUM_MULTIPART_UPLOAD_SIZE + 1 - uploader.add_record("test1", b"test_record") uploader.add_record("test2", b"a" * batch_size) uploader.add_record("test3", b"b" * batch_size) @@ -388,9 +387,9 @@ def test_real_storage_service( ) assert ( s3_service_integration_fixture.get_object("public", "test2") - == b"a" * (s3_service.MINIMUM_MULTIPART_UPLOAD_SIZE + 1) * 2 + == b"a" * batch_size * 2 ) assert ( s3_service_integration_fixture.get_object("public", "test3") - == b"b" * (s3_service.MINIMUM_MULTIPART_UPLOAD_SIZE + 1) + b"b" + == b"b" * batch_size + b"b" )