From d9dc5add0190d8718af5592667c8ed020790f1bf Mon Sep 17 00:00:00 2001 From: Maurane GLAUDE Date: Fri, 6 Dec 2024 09:59:54 +0100 Subject: [PATCH] fix(commands): fix test rules --- tests/integration/test_integration_token_end_to_end.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_integration_token_end_to_end.py b/tests/integration/test_integration_token_end_to_end.py index 365c160109..e4907bbf64 100644 --- a/tests/integration/test_integration_token_end_to_end.py +++ b/tests/integration/test_integration_token_end_to_end.py @@ -39,11 +39,10 @@ def test_nominal_case_of_an_api_user(client: TestClient, admin_access_token: str study_path = ASSETS_DIR / "STA-mini.zip" # create a bot - bot_name = "admin_bot" res = client.post( "/v1/bots", headers={"Authorization": f"Bearer {admin_access_token}"}, - json={"name": bot_name, "roles": [{"group": "admin", "role": 40}], "is_author": False}, + json={"name": "admin_bot", "roles": [{"group": "admin", "role": 40}], "is_author": False}, ) bot_headers = {"Authorization": f"Bearer {res.json()}"} @@ -181,8 +180,8 @@ def test_nominal_case_of_an_api_user(client: TestClient, admin_access_token: str assert commands_res.json() for command in commands_res.json(): - assert command.get("user_name") == bot_name - assert isinstance(command.get("updated_at"), datetime.datetime) + assert command.get("user_name") in ["admin", "admin_bot"] + assert command.get("updated_at") # generate variant before running a simulation res = client.put(f"/v1/studies/{variant_id}/generate", headers=bot_headers)