mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-25 19:23:58 +01:00
hopefully final please work
This commit is contained in:
parent
862f8d2c08
commit
cdf8d32ac0
|
@ -23,12 +23,4 @@ if 'prod' in sys.argv:
|
||||||
port = 2333
|
port = 2333
|
||||||
dev = False
|
dev = False
|
||||||
|
|
||||||
os.system(f'cd api && uvicorn main:app{" --reload" if dev else ""} --host 0.0.0.0 --port {port}')
|
os.system(f'cd api && uvicorn main:app{" --reload" if dev else ""} --host 0.0.0.0 --port {port} & python tests')
|
||||||
|
|
||||||
time.sleep(2)
|
|
||||||
|
|
||||||
import tests.__main__ as tests
|
|
||||||
tests.test_all()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import os
|
import os
|
||||||
import openai as closedai
|
import openai as closedai
|
||||||
import httpx
|
import httpx
|
||||||
|
import time
|
||||||
|
|
||||||
from rich import print
|
from rich import print
|
||||||
from typing import List
|
from typing import List
|
||||||
|
@ -92,6 +93,9 @@ def test_api_moderation() -> dict:
|
||||||
def test_all():
|
def test_all():
|
||||||
"""Runs all tests."""
|
"""Runs all tests."""
|
||||||
|
|
||||||
|
print("Waiting until API Server is started up...")
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
print('[lightblue]Running test on API server to check if its running...')
|
print('[lightblue]Running test on API server to check if its running...')
|
||||||
print(test_server())
|
print(test_server())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue