File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1577,7 +1577,9 @@ def raw_predict(
1577
1577
)
1578
1578
self .raw_predict_request_url = f"https://{ self .location } -{ constants .base .API_BASE_PATH } /v1/projects/{ self .project } /locations/{ self .location } /endpoints/{ self .name } :rawPredict"
1579
1579
1580
- return self .authorized_session .post (self .raw_predict_request_url , body , headers )
1580
+ return self .authorized_session .post (
1581
+ url = self .raw_predict_request_url , data = body , headers = headers
1582
+ )
1581
1583
1582
1584
def explain (
1583
1585
self ,
Original file line number Diff line number Diff line change 61
61
62
62
from google .protobuf import field_mask_pb2 , timestamp_pb2
63
63
64
+ from test_endpoints import ( # noqa: F401
65
+ create_endpoint_mock ,
66
+ )
67
+
64
68
_TEST_PROJECT = "test-project"
65
69
_TEST_PROJECT_2 = "test-project-2"
66
70
_TEST_LOCATION = "us-central1"
@@ -2782,5 +2786,7 @@ def test_raw_predict(self, raw_predict_mock):
2782
2786
test_endpoint = models .Endpoint (_TEST_ID )
2783
2787
test_endpoint .raw_predict (_TEST_RAW_PREDICT_DATA , _TEST_RAW_PREDICT_HEADER )
2784
2788
raw_predict_mock .assert_called_once_with (
2785
- _TEST_RAW_PREDICT_URL , _TEST_RAW_PREDICT_DATA , _TEST_RAW_PREDICT_HEADER
2789
+ url = _TEST_RAW_PREDICT_URL ,
2790
+ data = _TEST_RAW_PREDICT_DATA ,
2791
+ headers = _TEST_RAW_PREDICT_HEADER ,
2786
2792
)
You can’t perform that action at this time.
0 commit comments