Spaces:
Sleeping
Sleeping
Download tests/test_documents.py from thabsheeeeeer/DocBrain-API: direct link, hf CLI and curl.
- Browser
- Download file 427 Bytes
-
https://huggingface.co/spaces/thabsheeeeeer/DocBrain-API/resolve/main/tests/test_documents.py
- Command line
-
hf download hf://spaces/thabsheeeeeer/DocBrain-API/tests/test_documents.py
-
curl -L -o test_documents.py https://huggingface.co/spaces/thabsheeeeeer/DocBrain-API/resolve/main/tests/test_documents.py
427 Bytes
| from app.models.document import Document | |
| def test_document_model_creation(): | |
| document = Document( | |
| filename="sample.pdf", | |
| file_path="uploads/user_1/1_sample.pdf", | |
| user_id=1, | |
| file_hash="a" * 64, | |
| status="processing" | |
| ) | |
| assert document.filename == "sample.pdf" | |
| assert document.user_id == 1 | |
| assert document.status == "processing" | |
| assert len(document.file_hash) == 64 |