fix(mcp): status active + search_products guard + item.product + cleanup auto-name
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
import uuid
|
||||
import pytest
|
||||
from sqlalchemy import delete
|
||||
import app.api.mcp_server as mcp_server_module
|
||||
@@ -155,7 +156,14 @@ async def test_create_shopping_list_outil():
|
||||
async def test_create_shopping_list_nom_auto():
|
||||
result = await create_shopping_list()
|
||||
data = json.loads(result)
|
||||
# Le nom auto est au format "S{semaine} {année}" (ex: "S22 2026")
|
||||
assert data["name"].startswith("S")
|
||||
# Cleanup manuel — la liste auto n'a pas le préfixe TEST_MCP_
|
||||
async with mcp_server_module.AsyncSessionLocal() as session:
|
||||
await session.execute(
|
||||
delete(ShoppingList).where(ShoppingList.id == uuid.UUID(data["id"]))
|
||||
)
|
||||
await session.commit()
|
||||
|
||||
|
||||
async def test_add_shopping_item_outil():
|
||||
|
||||
Reference in New Issue
Block a user