test(test_key_generate_prisma.py): add sleep time

This commit is contained in:
Krrish Dholakia 2024-02-02 12:18:36 -08:00
parent 23357e9369
commit c7024baf7a

View file

@ -941,7 +941,7 @@ def test_call_with_key_over_budget(prisma_client):
start_time=datetime.now(), start_time=datetime.now(),
end_time=datetime.now(), end_time=datetime.now(),
) )
await asyncio.sleep(4)
# test spend_log was written and we can read it # test spend_log was written and we can read it
spend_logs = await view_spend_logs(request_id=request_id) spend_logs = await view_spend_logs(request_id=request_id)
@ -965,6 +965,8 @@ def test_call_with_key_over_budget(prisma_client):
asyncio.run(test()) asyncio.run(test())
except Exception as e: except Exception as e:
# print(f"Error - {str(e)}")
traceback.print_exc()
error_detail = e.message error_detail = e.message
assert "Authentication Error, ExceededTokenBudget:" in error_detail assert "Authentication Error, ExceededTokenBudget:" in error_detail
print(vars(e)) print(vars(e))