Skip to content

Commit

Permalink
馃敟 remove unused test
Browse files Browse the repository at this point in the history
Signed-off-by: Prashant Gupta <prashantgupta24@gmail.com>
  • Loading branch information
prashantgupta24 committed Oct 25, 2023
1 parent 3df2d35 commit f2e9e33
Showing 1 changed file with 3 additions and 27 deletions.
30 changes: 3 additions & 27 deletions tests/runtime/http_server/test_http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ def test_output_file_task(file_task_model_id, client):
assert pdf_result.read() == b"bounding|pdfdata\xff\xff\x00|box"


@pytest.mark.skip(
"Skipping testing streaming cases with FastAPI's testclient, pending resolution https://github.com/tiangolo/fastapi/discussions/10518"
)
def test_inference_streaming_sample_module(sample_task_model_id, client):
"""Simple check for testing a happy path unary-stream case"""
json_input = {"model_id": sample_task_model_id, "inputs": {"name": "world"}}
Expand Down Expand Up @@ -511,33 +514,6 @@ def test_inference_streaming_sample_module_actual_server(
)


def test_inference_streaming_sample_module_another_test(sample_task_model_id, client):
"""Another check for testing a happy path unary-stream case.
This was added to address https://github.com/caikit/caikit/issues/540"""
json_input = {
"model_id": sample_task_model_id,
"inputs": {"name": "another_world"},
}
stream = client.post(
f"/api/v1/task/server-streaming-sample",
json=json_input,
)
assert stream.status_code == 200
stream_content = stream.content.decode(stream.default_encoding)
stream_responses = json.loads(
"[{}]".format(
stream_content.replace("data: ", "")
.replace("\r\n", "")
.replace("}{", "}, {")
)
)
assert len(stream_responses) == 10
assert all(
resp.get("greeting") == "Hello another_world stream"
for resp in stream_responses
)


def test_no_model_id(client):
"""Simple check that we can ping a model"""
response = client.post(
Expand Down

0 comments on commit f2e9e33

Please sign in to comment.