Files
wehub-resource-sync 0418dc5cf9
CI / Python tests (3.10) (push) Has been cancelled
CI / Python tests (3.11) (push) Has been cancelled
CI / Python quality (push) Has been cancelled
CI / Frontend typecheck (push) Has been cancelled
Autopilot Pages / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:45:00 +08:00

27 lines
683 B
Python

"""Tests for the minimal team registry."""
import pytest
from openharness.coordinator.coordinator_mode import TeamRegistry
def test_create_add_and_delete_team():
registry = TeamRegistry()
team = registry.create_team("alpha", "demo")
registry.add_agent("alpha", "a123")
registry.send_message("alpha", "hello")
assert team.name == "alpha"
assert team.agents == ["a123"]
assert team.messages == ["hello"]
registry.delete_team("alpha")
assert registry.list_teams() == []
def test_duplicate_team_raises():
registry = TeamRegistry()
registry.create_team("alpha")
with pytest.raises(ValueError):
registry.create_team("alpha")