mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
(fix) fix error message raised on passing invalid tokens
This commit is contained in:
parent
6ee6fb6c73
commit
fd93a68b0d
2 changed files with 5 additions and 2 deletions
|
@ -158,7 +158,7 @@ def test_call_with_invalid_key(prisma_client):
|
|||
|
||||
async def test():
|
||||
await litellm.proxy.proxy_server.prisma_client.connect()
|
||||
generated_key = "bad-key"
|
||||
generated_key = "sk-126666"
|
||||
bearer_token = "Bearer " + generated_key
|
||||
|
||||
request = Request(scope={"type": "http"}, receive=None)
|
||||
|
@ -173,7 +173,7 @@ def test_call_with_invalid_key(prisma_client):
|
|||
except Exception as e:
|
||||
print("Got Exception", e)
|
||||
print(e.message)
|
||||
assert "Authentication Error" in e.message
|
||||
assert "Authentication Error, Invalid token passed" in e.message
|
||||
pass
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue