• Y
  • List All
  • Feedback
    • This Project
    • All Projects
Profile Account settings Log out
  • Favorite
  • Project
  • All
Loading...
  • Log in
  • Sign up
yjyoon / whisper_server_speaches star
  • Project homeH
  • CodeC
  • IssueI
  • Pull requestP
  • Review R
  • MilestoneM
  • BoardB
  • Files
  • Commit
  • Branches
whisper_server_speachestestsapi_model_test.py
Download as .zip file
File name
Commit message
Commit date
.github/workflows
update pre-commit deps, replace custom pyright hook
2024-07-03
examples
chore: update docker tag to latest
2024-06-03
faster_whisper_server
chore: fix ruff errors
2024-07-03
tests
chore: fix ruff errors
2024-07-03
.dockerignore
chore: ignore .env
2024-05-27
.envrc
init
2024-05-20
.gitattributes
docs: add live-transcription demo
2024-05-28
.gitignore
chore: update .gitignore
2024-07-03
.pre-commit-config.yaml
update pre-commit deps, replace custom pyright hook
2024-07-03
Dockerfile.cpu
fix task enum vals, fix env var parsing, improve gradio, use uv in dockerfile
2024-06-23
Dockerfile.cuda
fix task enum vals, fix env var parsing, improve gradio, use uv in dockerfile
2024-06-23
LICENSE
init
2024-05-20
README.md
Update README.md
2024-06-26
Taskfile.yaml
switch to using uv
2024-07-03
audio.wav
docs: update README.md
2024-05-27
compose.yaml
chore: update docker tag to latest
2024-06-03
flake.lock
init
2024-05-20
flake.nix
switch to using uv
2024-07-03
lsyncd.conf
chore: add lsyncd config
2024-06-03
pyproject.toml
chore: fix ruff errors
2024-07-03
requirements-all.txt
switch to using uv
2024-07-03
requirements-dev.txt
switch to using uv
2024-07-03
requirements.txt
switch to using uv
2024-07-03
File name
Commit message
Commit date
__init__.py
feat: add /v1/models and /v1/model routes #14
2024-06-03
api_model_test.py
chore: fix ruff errors
2024-07-03
app_test.py
chore: fix ruff errors
2024-07-03
conftest.py
chore: fix ruff errors
2024-07-03
sse_test.py
chore: fix ruff errors
2024-07-03
Fedir Zadniprovskyi 2024-07-03 88f0467 chore: fix ruff errors UNIX
Raw Open in browser Change history
from fastapi.testclient import TestClient from faster_whisper_server.server_models import ModelObject MODEL_THAT_EXISTS = "Systran/faster-whisper-tiny.en" MODEL_THAT_DOES_NOT_EXIST = "i-do-not-exist" MIN_EXPECTED_NUMBER_OF_MODELS = 200 # At the time of the test creation there are 228 models # HACK: because ModelObject(**data) doesn't work def model_dict_to_object(model_dict: dict) -> ModelObject: return ModelObject( id=model_dict["id"], created=model_dict["created"], object_=model_dict["object"], owned_by=model_dict["owned_by"], ) def test_list_models(client: TestClient) -> None: response = client.get("/v1/models") data = response.json() models = [model_dict_to_object(model_dict) for model_dict in data] assert len(models) > MIN_EXPECTED_NUMBER_OF_MODELS def test_model_exists(client: TestClient) -> None: response = client.get(f"/v1/models/{MODEL_THAT_EXISTS}") data = response.json() model = model_dict_to_object(data) assert model.id == MODEL_THAT_EXISTS def test_model_does_not_exist(client: TestClient) -> None: response = client.get(f"/v1/models/{MODEL_THAT_DOES_NOT_EXIST}") assert response.status_code == 404

          
        
    
    
Copyright Yona authors & © NAVER Corp. & NAVER LABS Supported by NAVER CLOUD PLATFORM

or
Sign in with github login with Google Sign in with Google
Reset password | Sign up