From a0f7e63f772af497e2ddb2b7c3a2abea1467730e Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Thu, 25 Jan 2024 16:16:03 -0300 Subject: [PATCH] Refactor code formatting in locustfile.py --- tests/locust/locustfile.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/locust/locustfile.py b/tests/locust/locustfile.py index 1fc91ee2c..aca0d1de9 100644 --- a/tests/locust/locustfile.py +++ b/tests/locust/locustfile.py @@ -66,7 +66,9 @@ class NameTest(FastHttpUser): result1, session_id = self.process(name, self.flow_id, payload1) payload2 = { - "inputs": {"text": "What is my name? Please, answer like this: Your name is "}, + "inputs": { + "text": "What is my name? Please, answer like this: Your name is " + }, "session_id": session_id, "sync": False, } @@ -86,7 +88,9 @@ class NameTest(FastHttpUser): logged_in_headers = {"Authorization": f"Bearer {a_token}"} print("Logged in") with open( - Path(__file__).parent.parent / "data" / "BasicChatwithPromptandHistory.json", + Path(__file__).parent.parent + / "data" + / "BasicChatwithPromptandHistory.json", "r", ) as f: json_flow = f.read() @@ -111,7 +115,11 @@ class NameTest(FastHttpUser): ) print(response.json()) user_id = next( - (user["id"] for user in response.json()["users"] if user["username"] == "superuser"), + ( + user["id"] + for user in response.json()["users"] + if user["username"] == "superuser" + ), None, ) # Create api key