Skip to content

Commit

Permalink
unfinished business
Browse files Browse the repository at this point in the history
  • Loading branch information
Wauplin committed Feb 10, 2025
1 parent 72396a8 commit c6ec0f8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_inference_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ def test_automatic_speech_recognition_payload(self):
payload = helper._prepare_payload(b"dummy_audio_data", {}, "username/repo_name")
assert payload == {"audio_url": f"data:audio/mpeg;base64,{base64.b64encode(b'dummy_audio_data').decode()}"}

def test_automatic_speech_recognition_response(self):
helper = FalAIAutomaticSpeechRecognitionTask()
response = helper.get_response({"text": "Hello world"})
assert response == "Hello world"

with pytest.raises(ValueError):
helper.get_response({"text": 123})

def test_text_to_image_payload(self):
helper = FalAITextToImageTask()
payload = helper._prepare_payload("a beautiful cat", {"width": 512, "height": 512}, "username/repo_name")
Expand Down

0 comments on commit c6ec0f8

Please sign in to comment.