docs: verify full-range image validation and record bounded-memory receipts
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
FF.F [100%]
|
||||
=================================== FAILURES ===================================
|
||||
_______________ test_36m_progressive_jpeg_is_valid_and_unchanged _______________
|
||||
|
||||
scenario = (<client.Client object at 0x102ae4290>, {'id': 'ef1e6ee9-739a-4dfe-8b05-78bef274c542', 'user': {'id': 'ef1e6ee9-739a-4...-06T15:51:51.913231Z', 'member_ids': ['ef1e6ee9-739a-4dfe-8b05-78bef274c542', '830c471d-1354-43d3-9241-ef98ffc87c7c']})
|
||||
|
||||
def test_36m_progressive_jpeg_is_valid_and_unchanged(scenario):
|
||||
data = progressive_jpeg()
|
||||
> attachment = upload(scenario, data, "image/jpeg", 201)["json"]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
student-tests/test_image_edges.py:73:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
student-tests/test_image_edges.py:21: in upload
|
||||
return c.call(
|
||||
tests/client.py:132: in call
|
||||
check(status in allowed, method + ' ' + path.split('?')[0] + ': expected ' + str(allowed) + ', received ' + str(status))
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
|
||||
condition = False
|
||||
message = 'POST /api/v1/chats/e9b3f246-cba5-470b-b88f-35da5340b635/attachments: expected [201], received 415'
|
||||
|
||||
def check(condition, message):
|
||||
if not condition:
|
||||
> raise Failure(message)
|
||||
E client.Failure: POST /api/v1/chats/e9b3f246-cba5-470b-b88f-35da5340b635/attachments: expected [201], received 415
|
||||
|
||||
tests/client.py:24: Failure
|
||||
__________________ test_apng_corrupt_later_frame_is_rejected ___________________
|
||||
|
||||
scenario = (<client.Client object at 0x102ae4290>, {'id': 'ef1e6ee9-739a-4dfe-8b05-78bef274c542', 'user': {'id': 'ef1e6ee9-739a-4...-06T15:51:51.913231Z', 'member_ids': ['ef1e6ee9-739a-4dfe-8b05-78bef274c542', '830c471d-1354-43d3-9241-ef98ffc87c7c']})
|
||||
|
||||
def test_apng_corrupt_later_frame_is_rejected(scenario):
|
||||
> upload(scenario, broken_later_frame(apng()), "image/png", 415)
|
||||
|
||||
student-tests/test_image_edges.py:81:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
student-tests/test_image_edges.py:21: in upload
|
||||
return c.call(
|
||||
tests/client.py:132: in call
|
||||
check(status in allowed, method + ' ' + path.split('?')[0] + ': expected ' + str(allowed) + ', received ' + str(status))
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
|
||||
condition = False
|
||||
message = 'POST /api/v1/chats/e9b3f246-cba5-470b-b88f-35da5340b635/attachments: expected [415], received 201'
|
||||
|
||||
def check(condition, message):
|
||||
if not condition:
|
||||
> raise Failure(message)
|
||||
E client.Failure: POST /api/v1/chats/e9b3f246-cba5-470b-b88f-35da5340b635/attachments: expected [415], received 201
|
||||
|
||||
tests/client.py:24: Failure
|
||||
______________________ test_apng_cumulative_canvas_limit _______________________
|
||||
|
||||
scenario = (<client.Client object at 0x102ae4290>, {'id': 'ef1e6ee9-739a-4dfe-8b05-78bef274c542', 'user': {'id': 'ef1e6ee9-739a-4...-06T15:51:51.913231Z', 'member_ids': ['ef1e6ee9-739a-4dfe-8b05-78bef274c542', '830c471d-1354-43d3-9241-ef98ffc87c7c']})
|
||||
|
||||
def test_apng_cumulative_canvas_limit(scenario):
|
||||
# Two 25M-pixel canvases exceed the total 40M decode budget.
|
||||
> upload(scenario, apng((5000, 5000)), "image/png", 413)
|
||||
|
||||
student-tests/test_image_edges.py:95:
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
student-tests/test_image_edges.py:21: in upload
|
||||
return c.call(
|
||||
tests/client.py:132: in call
|
||||
check(status in allowed, method + ' ' + path.split('?')[0] + ': expected ' + str(allowed) + ', received ' + str(status))
|
||||
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||
|
||||
condition = False
|
||||
message = 'POST /api/v1/chats/e9b3f246-cba5-470b-b88f-35da5340b635/attachments: expected [413], received 201'
|
||||
|
||||
def check(condition, message):
|
||||
if not condition:
|
||||
> raise Failure(message)
|
||||
E client.Failure: POST /api/v1/chats/e9b3f246-cba5-470b-b88f-35da5340b635/attachments: expected [413], received 201
|
||||
|
||||
tests/client.py:24: Failure
|
||||
=========================== short test summary info ============================
|
||||
FAILED student-tests/test_image_edges.py::test_36m_progressive_jpeg_is_valid_and_unchanged
|
||||
FAILED student-tests/test_image_edges.py::test_apng_corrupt_later_frame_is_rejected
|
||||
FAILED student-tests/test_image_edges.py::test_apng_cumulative_canvas_limit
|
||||
3 failed, 1 passed in 2.41s
|
||||
Reference in New Issue
Block a user