mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-25 18:53:58 +01:00
making tests properly handle exceptions
This commit is contained in:
parent
70c8dec419
commit
13416802cb
|
@ -92,7 +92,7 @@ def test_api_moderation() -> dict:
|
|||
|
||||
def test_all():
|
||||
"""Runs all tests."""
|
||||
|
||||
try:
|
||||
print("Waiting until API Server is started up...")
|
||||
time.sleep(6)
|
||||
|
||||
|
@ -110,6 +110,9 @@ def test_all():
|
|||
|
||||
print('[lightblue]Checking the /v1/models endpoint...')
|
||||
print(test_models())
|
||||
except Exception as e:
|
||||
print('[red]Error: ' + e)
|
||||
exit(500)
|
||||
|
||||
if __name__ == '__main__':
|
||||
closedai.api_base = api_endpoint
|
||||
|
|
Loading…
Reference in a new issue