tests: /me session shape includes lock_minutes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -33,8 +33,18 @@ def test_password_signin_and_me_shape(pg_client: TestClient, pg_settings: Settin
|
|||||||
"email": "[email protected]",
|
"email": "[email protected]",
|
||||||
}
|
}
|
||||||
assert me["roles"] == ["clerical"] and me["screens"] == ["clerical"] and me["groups"] == ["PS-Clerical"]
|
assert me["roles"] == ["clerical"] and me["screens"] == ["clerical"] and me["groups"] == ["PS-Clerical"]
|
||||||
assert set(me["session"]) == {"id", "kind", "created_at", "expires_at", "locked", "locked_since", "device"}
|
assert set(me["session"]) == {
|
||||||
|
"id",
|
||||||
|
"kind",
|
||||||
|
"created_at",
|
||||||
|
"expires_at",
|
||||||
|
"locked",
|
||||||
|
"locked_since",
|
||||||
|
"lock_minutes",
|
||||||
|
"device",
|
||||||
|
}
|
||||||
assert me["session"]["kind"] == "password" and me["session"]["locked"] is False
|
assert me["session"]["kind"] == "password" and me["session"]["locked"] is False
|
||||||
|
assert me["session"]["lock_minutes"] == 60 # Clerical: the desk minutes (issue #45)
|
||||||
assert me["session"]["device"] is None and me["session"]["locked_since"] is None
|
assert me["session"]["device"] is None and me["session"]["locked_since"] is None
|
||||||
assert me["pin"] == {"set": False, "disabled": False} and me["can_register_device"] is False
|
assert me["pin"] == {"set": False, "disabled": False} and me["can_register_device"] is False
|
||||||
assert pg_client.get("/api/auth/me").json() == me
|
assert pg_client.get("/api/auth/me").json() == me
|
||||||
|
|||||||
Reference in New Issue
Block a user