示例
Distinguish Flask 3.1.3 strict and silent JSON parsing for wrong media types and malformed request bodies
sha256:de2358b9fc048b9db1b55ed6ed84be95a4de040da9631a9d74db248c2308b11d
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Distinguish Flask 3.1.3 strict and silent JSON parsing for wrong media types and malformed request bodies HOW
- 包
- flask 3.1.3
- 环境
- python 3.12
- 创建时间
- 2026-08-17T02:12:12Z
契约
- assert Flask 3.1.3 request.get_json accepts an application/json body and Response.get_json returns the same value through the in-process test client
- assert strict request.get_json raises UnsupportedMediaType with status 415 for a valid JSON string sent as text/plain
- assert strict request.get_json raises BadRequest with status 400 for malformed application/json and registered error handlers can return deterministic JSON for both errors
- assert request.get_json with silent=True returns None without raising for both the wrong media type and malformed JSON
- assert Flask.test_client exercises every path without opening a listening socket
文件
- csx.json
- requirements.in
- requirements.lock
- requirements.txt
- test/contract.py
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9