@@ -24,7 +24,7 @@ def test_predict_endpoint_ptype():
2424 np .random .seed (500 )
2525 client = TestClient (_start_application ().app )
2626 data = {"B" : 0 , "C" : 0 , "D" : 0 }
27- response = client .post ("/predict/ " , json = data )
27+ response = client .post ("/predict" , json = data )
2828 assert response .status_code == 200 , response .text
2929 assert response .json () == {"prediction" : [44.47 ]}, response .json ()
3030
@@ -33,7 +33,7 @@ def test_predict_endpoint_ptype_batch():
3333 np .random .seed (500 )
3434 client = TestClient (_start_application ().app )
3535 data = [{"B" : 0 , "C" : 0 , "D" : 0 }, {"B" : 0 , "C" : 0 , "D" : 0 }]
36- response = client .post ("/predict/ " , json = data )
36+ response = client .post ("/predict" , json = data )
3737 assert response .status_code == 200 , response .text
3838 assert response .json () == {"prediction" : [44.47 , 44.47 ]}, response .json ()
3939
@@ -42,15 +42,15 @@ def test_predict_endpoint_ptype_error():
4242 np .random .seed (500 )
4343 client = TestClient (_start_application ().app )
4444 data = {"B" : 0 , "C" : "a" , "D" : 0 }
45- response = client .post ("/predict/ " , json = data )
45+ response = client .post ("/predict" , json = data )
4646 assert response .status_code == 422 , response .text # value is not a valid integer
4747
4848
4949def test_predict_endpoint_no_ptype ():
5050 np .random .seed (500 )
5151 client = TestClient (_start_application (save_ptype = False ).app )
5252 data = "0,0,0"
53- response = client .post ("/predict/ " , json = data )
53+ response = client .post ("/predict" , json = data )
5454 assert response .status_code == 200 , response .text
5555 assert response .json () == {"prediction" : [44.47 ]}, response .json ()
5656
@@ -59,7 +59,7 @@ def test_predict_endpoint_no_ptype_batch():
5959 np .random .seed (500 )
6060 client = TestClient (_start_application (save_ptype = False ).app )
6161 data = [["0,0,0" ], ["0,0,0" ]]
62- response = client .post ("/predict/ " , json = data )
62+ 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 ()
6565
@@ -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 ("/predict/ " , json = data )
72+ client .post ("/predictt " , json = data )
0 commit comments