We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 603fdc1 commit aee7ee9Copy full SHA for aee7ee9
tests/server/auth/middleware/test_bearer_auth.py
@@ -307,10 +307,14 @@ async def send(message: Message) -> None:
307
assert excinfo.value.detail == "Unauthorized"
308
assert not app.called
309
310
- async def test_no_user_with_adds_www_authenticate_header(
+ async def test_unauthenticated_user_adds_www_authenticate_header(
311
self,
312
):
313
- """Test middleware with no user in scope."""
+ """Test middleware with unauthenticated user.
314
+
315
+ It should add www-authenticate header to the response when resource metadata
316
+ URL is provided.
317
+ """
318
app = MockApp()
319
middleware = RequireAuthMiddleware(
320
app,
0 commit comments