Spaces:
Running on Zero
Running on Zero
Check previews and original image downloads separately
Browse files- tests/test_api.py +2 -1
tests/test_api.py
CHANGED
|
@@ -40,7 +40,8 @@ def test_upload_rejects_invalid_data_and_normalizes_valid_images(client):
|
|
| 40 |
assert response.status_code == 200
|
| 41 |
session = response.json()
|
| 42 |
assert (session["width"], session["height"]) == (128, 80)
|
| 43 |
-
assert client.get(session["image"]).headers["content-type"] == "image/
|
|
|
|
| 44 |
assert client.get(f"/api/sessions/{session['id']}/targets").status_code == 404
|
| 45 |
|
| 46 |
|
|
|
|
| 40 |
assert response.status_code == 200
|
| 41 |
session = response.json()
|
| 42 |
assert (session["width"], session["height"]) == (128, 80)
|
| 43 |
+
assert client.get(session["image"]).headers["content-type"] == "image/webp"
|
| 44 |
+
assert client.get(f"/api/sessions/{session['id']}/source.png").headers["content-type"] == "image/png"
|
| 45 |
assert client.get(f"/api/sessions/{session['id']}/targets").status_code == 404
|
| 46 |
|
| 47 |
|