Commit 535add25 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Added test for hash with two uploads.

parent 40fa8029
......@@ -69,6 +69,14 @@ def uploaded_id(clear_files) -> Generator[str, None, None]:
yield example_upload_id
def uploaded_id_same_file(clear_files) -> Generator[str, None, None]:
example_upload_id = '__test_upload_id2'
files._client.fput_object(config.files.uploads_bucket, example_upload_id, example_file)
yield example_upload_id
def upload_id(clear_files) -> Generator[str, None, None]:
example_upload_id = '__test_upload_id'
......@@ -132,12 +140,15 @@ def test_metadata(uploaded_id: str):
assert upload.metadata is not None
def test_hash(uploaded_id: str):
def test_hash(uploaded_id: str, uploaded_id_same_file: str):
with files.Upload(uploaded_id) as upload:
hash = upload.hash()
assert hash is not None
assert isinstance(hash, str)
with files.Upload(uploaded_id_same_file) as upload:
assert hash == upload.hash()
def test_archive_url(archive_id: str):
result = files.archive_url(archive_id)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment