@@ -36,7 +36,7 @@ def test_translate_success(mock_translation_model, mock_get_model, client):
3636 "tgt_lang" : "fr"
3737 }
3838
39- response = client .post ("/translate" , json = test_data )
39+ response = client .post ("/api/v1/ translate" , json = test_data )
4040 assert response .status_code == status .HTTP_200_OK
4141 data = response .json ()
4242 assert data ["translation" ] == "Bonjour le monde"
@@ -74,7 +74,7 @@ def test_translate_with_model_type(mock_translation_model, mock_get_model, clien
7474 "model_type" : "m2m100"
7575 }
7676
77- response = client .post ("/translate" , json = test_data )
77+ response = client .post ("/api/v1/ translate" , json = test_data )
7878 assert response .status_code == status .HTTP_200_OK
7979 data = response .json ()
8080 assert data ["translation" ] == "Bonjour le monde"
@@ -102,7 +102,7 @@ def test_translate_model_not_loaded(mock_translation_model, mock_get_model, clie
102102 "tgt_lang" : "fr"
103103 }
104104
105- response = client .post ("/translate" , json = test_data )
105+ response = client .post ("/api/v1/ translate" , json = test_data )
106106 assert response .status_code == status .HTTP_500_INTERNAL_SERVER_ERROR
107107 data = response .json ()
108108 assert "detail" in data
@@ -134,7 +134,7 @@ def test_translate_model_error(mock_translation_model, mock_get_model, client):
134134 }
135135
136136 # Make the request
137- response = client .post ("/translate" , json = test_data )
137+ response = client .post ("/api/v1/ translate" , json = test_data )
138138
139139 # Check that we got a 500 error
140140 assert response .status_code == status .HTTP_500_INTERNAL_SERVER_ERROR
0 commit comments