Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathangreen committed Sep 11, 2024
1 parent 0554094 commit 9f6e3b1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/manager/marc/test_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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"
)

0 comments on commit 9f6e3b1

Please sign in to comment.