Skip to content

Commit

Permalink
updates tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BWMac committed Sep 27, 2024
1 parent dea9244 commit 2dbb55d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions synapseclient/core/download/download_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ def _generate_chunk_ranges(
def _pre_signed_url_expiration_time(url: str) -> datetime:
"""
Returns time at which a presigned url will expire
for an AWS S3 pre-signed url
Arguments:
url: A pre-signed download url from AWS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ async def test_pre_signed_url_expiration_time(self) -> None:
"&X-Amz-Expires=86400"
"&X-Amz-SignedHeaders=host"
"&X-Amz-Signature=signature-value"
"&Expires=1715000000"
)

expected = (
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/synapseclient/core/unit_test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,8 +834,8 @@ async def test_download_md5_mismatch_local_file(self) -> None:
assert not mocked_remove.called

async def test_download_expired_url(self, syn: Synapse) -> None:
url = "http://www.ayy.lmao/filerino.txt?Expires=0"
new_url = "http://www.ayy.lmao/new_url.txt?Expires=1715000000"
url = "http://www.ayy.lmao/filerino.txt?Expires=0&X-Amz-Date=20240509T180000Z&X-Amz-Expires=1000"
new_url = "http://www.ayy.lmao/new_url.txt?Expires=1715000000&X-Amz-Date=20240509T180000Z&X-Amz-Expires=1000"
contents = "\n".join(str(i) for i in range(1000))
temp_destination = os.path.normpath(
os.path.expanduser("~/fake/path/filerino.txt.temp")
Expand Down

0 comments on commit 2dbb55d

Please sign in to comment.