fix: persist account ownership for script templates and generations
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"""Integration tests for Script Template Editor permissions and share endpoint."""
|
||||
from uuid import UUID as PyUUID
|
||||
|
||||
import pytest
|
||||
from httpx import AsyncClient
|
||||
from sqlalchemy import select
|
||||
@@ -65,6 +67,9 @@ class TestScriptTemplatePermissions:
|
||||
data = resp.json()
|
||||
assert data["name"] == "Test Template"
|
||||
assert data["created_by"] is not None
|
||||
result = await test_db.execute(select(ScriptTemplate).where(ScriptTemplate.id == PyUUID(data["id"])))
|
||||
template = result.scalar_one()
|
||||
assert template.account_id is not None
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_engineer_can_edit_own_template(self, client, auth_headers, test_db):
|
||||
|
||||
Reference in New Issue
Block a user