(self)
| 354 | self.assertEqual(outcome, [{"request_body": b"Body data!"}]) |
| 355 | |
| 356 | async def test_untouched_request_body_gets_closed(self): |
| 357 | application = get_asgi_application() |
| 358 | scope = self.async_request_factory._base_scope(method="POST", path="/post/") |
| 359 | communicator = ApplicationCommunicator(application, scope) |
| 360 | await communicator.send_input({"type": "http.request"}) |
| 361 | response_start = await communicator.receive_output() |
| 362 | self.assertEqual(response_start["type"], "http.response.start") |
| 363 | self.assertEqual(response_start["status"], 204) |
| 364 | response_body = await communicator.receive_output() |
| 365 | self.assertEqual(response_body["type"], "http.response.body") |
| 366 | self.assertEqual(response_body["body"], b"") |
| 367 | # Allow response.close() to finish |
| 368 | await communicator.wait() |
| 369 | |
| 370 | async def test_get_query_string(self): |
| 371 | application = get_asgi_application() |
nothing calls this directly
no test coverage detected