@@ -60,7 +60,7 @@ def test_logging_middleware_regular_logger(caplog: "LogCaptureFixture", handler:
6060 assert len (caplog .messages ) == 2
6161
6262 assert caplog .messages [0 ] == "HTTP Request"
63- assert caplog .records [0 ].litestar == {
63+ assert caplog .records [0 ].litestar == { # type: ignore[attr-defined]
6464 "path" : "/" ,
6565 "method" : "GET" ,
6666 "content_type" : '["",{}]' ,
@@ -179,7 +179,7 @@ def test_logging_middleware_compressed_response_body(
179179 create_test_client (
180180 route_handlers = [handler ],
181181 compression_config = CompressionConfig (backend = "gzip" , minimum_size = 1 ),
182- middleware = [LoggingMiddleware (include_compressed_body = include , response_log_fields = ( "body" ,) )],
182+ middleware = [LoggingMiddleware (include_compressed_body = include , response_log_fields = [ "body" ,] )],
183183 ) as client ,
184184 ):
185185 # Set cookies on the client to avoid warnings about per-request cookies.
@@ -188,9 +188,9 @@ def test_logging_middleware_compressed_response_body(
188188 assert response .status_code == HTTP_200_OK
189189 assert len (caplog .messages ) == 2
190190 if include :
191- assert "body" in caplog .records [1 ].litestar
191+ assert "body" in caplog .records [1 ].litestar # type: ignore[attr-defined]
192192 else :
193- assert "body" not in caplog .records [1 ].litestar
193+ assert "body" not in caplog .records [1 ].litestar # type: ignore[attr-defined]
194194
195195
196196def test_logging_middleware_post_body () -> None :
@@ -260,9 +260,9 @@ def test_logging_middleware_log_fields(caplog: "LogCaptureFixture", handler: HTT
260260 assert len (caplog .messages ) == 2
261261
262262 assert caplog .messages [0 ] == "HTTP Request"
263- assert caplog .records [0 ].litestar == {"path" : "/" }
263+ assert caplog .records [0 ].litestar == {"path" : "/" } # type: ignore[attr-defined]
264264 assert caplog .messages [1 ] == "HTTP Response"
265- assert caplog .records [1 ].litestar == {"status_code" : 200 }
265+ assert caplog .records [1 ].litestar == {"status_code" : 200 } # type: ignore[attr-defined]
266266
267267
268268def test_logging_middleware_with_session_middleware (session_backend_config_memory : "ServerSideSessionConfig" ) -> None :
0 commit comments