wip(handoff): restore backend suite to green
Some checks failed
Mirror to GitHub / mirror (push) Successful in 12s
CI / backend (pull_request) Failing after 27m35s
CI / frontend (pull_request) Successful in 2m46s
CI / e2e (pull_request) Failing after 4m9s

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
2026-04-25 06:13:23 -04:00
parent 208ec996d5
commit 49f88569da
26 changed files with 165 additions and 77 deletions

View File

@@ -4,6 +4,7 @@ from datetime import datetime, timezone, timedelta
from httpx import AsyncClient
from uuid import uuid4
from app.models.account import Account
from app.models.tree import Tree
from app.models.tree_share import TreeShare
from app.models.user import User
@@ -287,13 +288,17 @@ class TestTreeSharing:
@pytest.mark.asyncio
async def test_migration_defaults_visibility_to_team(test_db):
"""Test that existing trees default to 'team' visibility after migration."""
account = Account(name="Migration Default Test", display_code=uuid4().hex[:8])
test_db.add(account)
await test_db.flush()
# Create a tree without specifying visibility
tree = Tree(
name="Old Tree",
description="Created before migration",
tree_structure={"id": "root", "type": "decision", "question": "Test?", "children": []},
author_id=None,
account_id=None
account_id=account.id
)
test_db.add(tree)
await test_db.commit()