mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-30 11:00:11 +08:00
fixes
This commit is contained in:
parent
7a1618accf
commit
3dfc7262bc
@ -55,13 +55,15 @@ class TestRoutes(unittest.TestCase):
|
||||
app, _, _ = io.launch(prevent_thread_lock=True)
|
||||
client = TestClient(app)
|
||||
response = client.post(
|
||||
"/api/predict/", json={"data": ["test", None], "fn_index": 0}
|
||||
"/api/predict/",
|
||||
json={"data": ["test", None], "fn_index": 0, "session_hash": "_"},
|
||||
)
|
||||
output = dict(response.json())
|
||||
print("output", output)
|
||||
self.assertEqual(output["data"], ["test", None])
|
||||
response = client.post(
|
||||
"/api/predict/", json={"data": ["test", None], "fn_index": 0}
|
||||
"/api/predict/",
|
||||
json={"data": ["test", None], "fn_index": 0, "session_hash": "_"},
|
||||
)
|
||||
output = dict(response.json())
|
||||
self.assertEqual(output["data"], ["testtest", None])
|
||||
|
Loading…
Reference in New Issue
Block a user