test(test_key_generate_dynamodb.py): fix test

This commit is contained in:
Krrish Dholakia 2024-02-05 21:43:17 -08:00
parent f2a7e2ee98
commit a9a4f4cf0f

View file

@ -490,8 +490,13 @@ def test_dynamo_db_migration(custom_db_client):
try:
async def test():
request = GenerateKeyRequest(max_budget=1)
key = await generate_key_fn(request)
print(key)
generated_key = key.key
bearer_token = (
"Bearer " + "sk-elJDL2pOEjcAuC7zD4psAg"
"Bearer " + generated_key
) # this works with ishaan's db, it's a never expiring key
request = Request(scope={"type": "http"})
@ -508,4 +513,4 @@ def test_dynamo_db_migration(custom_db_client):
asyncio.run(test())
except Exception as e:
pytest.fail(f"An exception occurred - {str(e)}")
pytest.fail(f"An exception occurred - {traceback.format_exc()}")