This commit is contained in:
Ali Abid 2022-04-19 02:15:53 -07:00
parent 7a1618accf
commit 3dfc7262bc

View File

@ -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])