fix: update test assertions and lint fixes for Starlette 1.0 TemplateResponse API

Update test mocks to check kwargs["context"] instead of positional
args[1] for tests that verify auth.py and base.py wrapper behavior.
Fix B026 lint error by avoiding star-arg after keyword argument.

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/7b5f7e0d-89ad-43be-b68d-a9c0c5407a7e
This commit is contained in:
copilot-swe-agent[bot]
2026-03-23 13:14:25 +00:00
parent c4e10bee5e
commit 93629ff440
6 changed files with 15 additions and 15 deletions
+3 -2
View File
@@ -69,8 +69,9 @@ class TestViewsBase:
context = {"request": req}
template_response_with_version("template.html", context)
args, _ = mock_orig.call_args
assert args[1].get("csrf_token") == "my-csrf"
args, kwargs = mock_orig.call_args
context = kwargs.get("context", {})
assert context.get("csrf_token") == "my-csrf"
def test_kwargs_context_no_request(self):
"""Test kwargs context path when request is not in context."""