Spaces:
Sleeping
Sleeping
Download tests/test_image_validation.py from baljot07/studiq-backend: direct link, hf CLI and curl.
- Browser
- Download file 364 Bytes
-
https://huggingface.co/spaces/baljot07/studiq-backend/resolve/main/tests/test_image_validation.py
- Command line
-
hf download hf://spaces/baljot07/studiq-backend/tests/test_image_validation.py
-
curl -L -o test_image_validation.py https://huggingface.co/spaces/baljot07/studiq-backend/resolve/main/tests/test_image_validation.py
364 Bytes
| """Unit tests for image MIME-type detection and validation.""" | |
| import pytest | |
| def test_mime_type_validation(): | |
| """Verify supported image MIME types.""" | |
| allowed_types = ["image/png", "image/jpeg", "image/webp", "image/gif"] | |
| assert "image/png" in allowed_types | |
| assert "image/jpeg" in allowed_types | |
| assert "application/pdf" not in allowed_types | |