@@ -49,7 +49,7 @@ def test_predict_endpoint_ptype_error():
4949def test_predict_endpoint_no_ptype ():
5050 np .random .seed (500 )
5151 client = TestClient (_start_application (save_ptype = False ).app )
52- data = "0,0,0"
52+ data = [{ "B" : 0 , "C" : 0 , "D" : 0 }]
5353 response = client .post ("/predict" , json = data )
5454 assert response .status_code == 200 , response .text
5555 assert response .json () == {"prediction" : [44.47 ]}, response .json ()
@@ -58,7 +58,7 @@ def test_predict_endpoint_no_ptype():
5858def test_predict_endpoint_no_ptype_batch ():
5959 np .random .seed (500 )
6060 client = TestClient (_start_application (save_ptype = False ).app )
61- data = [["0,0,0" ], ["0,0,0" ]]
61+ data = [[0 , 0 , 0 ], [0 , 0 , 0 ]]
6262 response = client .post ("/predict" , json = data )
6363 assert response .status_code == 200 , response .text
6464 assert response .json () == {"prediction" : [44.47 , 44.47 ]}, response .json ()
@@ -69,4 +69,4 @@ def test_predict_endpoint_no_ptype_error():
6969 client = TestClient (_start_application (save_ptype = False ).app )
7070 data = {"hell0" , 9 , 32.0 }
7171 with pytest .raises (TypeError ):
72- client .post ("/predictt " , json = data )
72+ client .post ("/predict " , json = data )
0 commit comments