Skip to content

Commit

Permalink
Flush temporary file before testing hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez committed Oct 30, 2024
1 parent 9ef9a43 commit 14eb0c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/galaxy_test/api/test_tools_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,7 @@ def test_upload_tar_roundtrip(self, history_id):
def _assert_content_matches_hash(self, content: bytes, expected_hash: str):
with tempfile.NamedTemporaryFile("wb") as temp:
temp.write(content)
temp.flush()
actual_hash = md5_hash_file(temp.name)
assert actual_hash == expected_hash

Expand Down

0 comments on commit 14eb0c3

Please sign in to comment.