tests/unit/test_hashfile.py
raw| 1 | from __future__ import annotations |
| 2 | |
| 3 | from io import BytesIO |
| 4 | |
| 5 | from auditwheel.hashfile import hashfile |
| 6 | |
| 7 | |
| 8 | def test_hash(): |
| 9 | # GIVEN |
| 10 | mock_file = BytesIO(b"this is a test file") |
| 11 | |
| 12 | # WHEN |
| 13 | result = hashfile(mock_file) |
| 14 | |
| 15 | # THEN |
| 16 | assert result == "5881707e54b0112f901bc83a1ffbacac8fab74ea46a6f706a3efc5f7d4c1c625" |