fix: stabilize maintenance flow run/resume and procedural scrolling
This commit is contained in:
@@ -98,6 +98,23 @@ async def test_get_schedule_not_found(client: AsyncClient, auth_headers: dict):
|
||||
assert resp.status_code == 404
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_cannot_create_schedule_for_non_maintenance_tree(
|
||||
client: AsyncClient, auth_headers: dict, test_tree: dict
|
||||
):
|
||||
"""Schedules are restricted to maintenance flows."""
|
||||
resp = await client.post(
|
||||
"/api/v1/maintenance-schedules",
|
||||
json={
|
||||
"tree_id": test_tree["id"],
|
||||
"cron_expression": "0 0 1 * *",
|
||||
"timezone": "UTC",
|
||||
},
|
||||
headers=auth_headers,
|
||||
)
|
||||
assert resp.status_code == 400
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_cannot_schedule_other_teams_tree(client: AsyncClient, auth_headers: dict, test_db):
|
||||
"""User cannot create a schedule for a tree belonging to another team."""
|
||||
|
||||
Reference in New Issue
Block a user