mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Scenarios outside the portfolio refuse the run 🟥
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
e9eb068be9
commit
ca799cc5e5
1 changed files with 16 additions and 0 deletions
|
|
@ -131,6 +131,22 @@ def test_trigger_run_rejects_filters_that_match_no_properties(api: Api) -> None:
|
|||
assert api.subtasks_for(task) == []
|
||||
|
||||
|
||||
def test_trigger_run_rejects_scenarios_outside_the_portfolio(api: Api) -> None:
|
||||
# arrange — one valid scenario, one belonging to a different portfolio
|
||||
task = api.seed_task()
|
||||
ours = api.seed_scenario()
|
||||
theirs = api.seed_scenario(portfolio_id=999)
|
||||
api.seed_property()
|
||||
|
||||
# act
|
||||
response = _trigger(api, task, [ours, theirs])
|
||||
|
||||
# assert — refused outright; nothing partially distributed
|
||||
assert response.status_code == 400
|
||||
assert api.sent_bodies == []
|
||||
assert api.subtasks_for(task) == []
|
||||
|
||||
|
||||
def test_trigger_run_fans_out_one_subtask_and_message_per_scenario_batch(
|
||||
api: Api,
|
||||
) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue