Spaces:
Sleeping

File size: 289 Bytes
45e7ae0
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
from app.utils.hash import generate_file_hash


def test_generate_file_hash(tmp_path):
    file_path = tmp_path / "sample.txt"
    file_path.write_text("hello world")

    file_hash = generate_file_hash(str(file_path))

    assert isinstance(file_hash, str)
    assert len(file_hash) == 64