Files
openclaw-mission-control/backend/tests/test_board_schema.py

31 lines
778 B
Python
Raw Normal View History

import pytest
from app.schemas.boards import BoardCreate
2026-02-05 15:00:20 +05:30
def test_goal_board_requires_objective_and_metrics_when_confirmed():
with pytest.raises(ValueError):
2026-02-05 15:00:20 +05:30
BoardCreate(
name="Goal Board",
slug="goal",
board_type="goal",
goal_confirmed=True,
)
BoardCreate(
name="Goal Board",
slug="goal",
board_type="goal",
2026-02-05 15:00:20 +05:30
goal_confirmed=True,
objective="Launch onboarding",
success_metrics={"emails": 3},
)
2026-02-05 15:00:20 +05:30
def test_goal_board_allows_missing_objective_before_confirmation():
BoardCreate(name="Draft", slug="draft", board_type="goal")
def test_general_board_allows_missing_objective():
BoardCreate(name="General", slug="general", board_type="general")