Skip to content

Commit

Permalink
fix(commands): fix test rules
Browse files Browse the repository at this point in the history
  • Loading branch information
maugde committed Dec 6, 2024
1 parent 4700fbd commit d9dc5ad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/integration/test_integration_token_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}"}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d9dc5ad

Please sign in to comment.