(message: Message)
| 261 | ... class="cm"># pragma: no cover |
| 262 | |
| 263 | async def send(message: Message) -> None: |
| 264 | if message[class="st">"type"] == class="st">"http.response.start": |
| 265 | assert message[class="st">"status"] == status.HTTP_200_OK |
| 266 | headers = Headers(raw=message[class="st">"headers"]) |
| 267 | assert headers[class="st">"content-type"] == class="st">"image/png" |
| 268 | assert class="st">"content-length" in headers |
| 269 | assert class="st">"content-disposition" in headers |
| 270 | assert class="st">"last-modified" in headers |
| 271 | assert class="st">"etag" in headers |
| 272 | elif message[class="st">"type"] == class="st">"http.response.body": class="cm"># pragma: no branch |
| 273 | assert message[class="st">"body"] == bclass="st">"" |
| 274 | assert message[class="st">"more_body"] is False |
| 275 | |
| 276 | class="cm"># Since the TestClient drops the response body on HEAD requests, we need to test |
| 277 | class="cm"># this directly. |
no test coverage detected