Skip to content

Commit

Permalink
'clientIp' can no longer be set with TestClient
Browse files Browse the repository at this point in the history
The 'client' scope was removed in
encode/starlette#2377, which means we can't read
the client IP from it in unit tests
  • Loading branch information
imjoehaines committed Jan 24, 2024
1 parent b22ab1f commit 8c650a8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion tests/integrations/test_asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ async def app(scope, recv, send):
self.assertEqual('GET', request['httpMethod'])
self.assertEqual('http', request['type'])
self.assertEqual('http://testserver/', request['url'])
self.assertEqual('testclient', request['clientIp'])
self.assertEqual('testclient', request['headers']['user-agent'])

exception = payload['events'][0]['exceptions'][0]
Expand Down

0 comments on commit 8c650a8

Please sign in to comment.