diff --git a/docreader/locust-test/locustfile.py b/docreader/locust-test/locustfile.py index 1f36fbb..c08d206 100644 --- a/docreader/locust-test/locustfile.py +++ b/docreader/locust-test/locustfile.py @@ -33,7 +33,7 @@ def backend_reprocess(self): headers = {'Content-Type': 'application/json'} - with self.client.post("/api/v2/transaction/start", json={"privateKey": private_key, 'metadata': {}}, headers=headers) as response: + with self.client.post("/api/v2/transaction/start", json={"privateKey": private_key, 'metadata': {}}, headers=headers, catch_response=True) as response: res_json = json.loads(response.text) transaction_id = res_json["transactionId"] self.client.post(f"/api/v2/transaction/{transaction_id}", headers={'x-client-key': public_key}, diff --git a/faceapi/locust-test/locustfile.py b/faceapi/locust-test/locustfile.py index 1eb2a08..f9d045d 100644 --- a/faceapi/locust-test/locustfile.py +++ b/faceapi/locust-test/locustfile.py @@ -70,7 +70,7 @@ def liveness(self): headers = {'Content-Type': 'application/json'} - with self.client.post("/api/v2/liveness/start", data=contents_start_liveness, headers=headers) as response: + with self.client.post("/api/v2/liveness/start", data=contents_start_liveness, headers=headers, catch_response=True) as response: res_json = json.loads(response.text) transaction_id = res_json["transactionId"] self.client.post(f"/api/v2/liveness?transactionId={transaction_id}",