tests: cover switch-group path in guest cancel
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
inference-admin committed 2026-11-19 23:41:15 +00:00
1 parent ac2ba4d2c1
commit c57dbdb62e
1 file changed
+5
+5
View File
@@ -73,6 +73,10 @@ m.httpx.AsyncClient = _NoNetwork
calls = {"group": [], "revoke": [], "listmonk": [], "email": []}
async def rec_switch(user_id, add_gid=None, remove_gids=()):
calls["group"].append((user_id, add_gid))
async def rec_group(user_id, group_id=None):
calls["group"].append((user_id, group_id or m.MEMBERS_GROUP_ID))
@@ -103,6 +107,7 @@ async def fake_team_id(email):
return "team-" + email
m.cloudron_switch_group = rec_switch
m.cloudron_set_group = rec_group
m.cloudron_set_active = rec_group # same signature (uid, bool)
m.litellm_team_id_for_email = fake_team_id