Created At: 2026-11-18T09:41:15Z Completed At: 2026-11-18T09:41:22Z Command exited with code 1. Command output: ============================= test session starts ============================== platform linux -- Python 3.12.3, pytest-9.2.0, pluggy-1.7.0 -- /root/telegram-saas/.venv/bin/python3 cachedir: .pytest_cache rootdir: /root/telegram-saas configfile: pyproject.toml plugins: anyio-4.16.0, asyncio-1.5.0 asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=function, asyncio_default_test_loop_scope=function collecting ... collected 3 items tests/unit/test_marketplace.py::test_marketplace_bot_manifests_catalog_integrity PASSED [ 33%] tests/unit/test_marketplace.py::test_reusable_marketplace_modules_catalog PASSED [ 66%] tests/integration/test_marketplace_api.py::test_marketplace_api_full_lifecycle_and_tenant_isolation FAILED [100%] =================================== FAILURES =================================== ___________ test_marketplace_api_full_lifecycle_and_tenant_isolation ___________ async_client = db_session = @pytest.mark.asyncio async def test_marketplace_api_full_lifecycle_and_tenant_isolation( async_client: AsyncClient, db_session: AsyncSession ): # 1. Setup Tenant A & User A user_a_email = f"market_user_{uuid.uuid4().hex[:6]}@example.com" reg_resp_a = await async_client.post( "/api/v1/auth/register", json={"email": user_a_email, "password": "Password123!", "full_name": "Marketplace Admin"}, ) assert reg_resp_a.status_code == 201 token_a = reg_resp_a.json()["data"]["access_token"] tenant_resp_a = await async_client.post( "/api/v1/tenants", headers={"Authorization": f"Bearer {token_a}"}, json={"name": "Marketplace Cloud Tenant", "slug": f"cloud-{uuid.uuid4().hex[:6]}"}, ) assert tenant_resp_a.status_code == 201 tenant_a_id = tenant_resp_a.json()["data"]["id"] headers_a = { "Authorization": f"Bearer {token_a}", "X-Tenant-ID": tenant_a_id, } # 2. Test GET /api/v1/marketplace/categories cat_resp = await async_client.get("/api/v1/marketplace/categories", headers=headers_a) assert cat_resp.status_code == 200 categories = cat_resp.json()["data"] assert len(categories) == 6 all_cat = next(c for c in categories if c["slug"] == "all") assert all_cat["count"] == 25 biz_cat = next(c for c in categories if c["slug"] == "business") assert biz_cat["count"] == 6 # 3. Test GET /api/v1/marketplace/templates all_tmpl_resp = await async_client.get("/api/v1/marketplace/templates", headers=headers_a) assert all_tmpl_resp.status_code == 200 templates = all_tmpl_resp.json()["data"] assert len(templates) == 25 # 4. Filter by category ai_tmpl_resp = await async_client.get( "/api/v1/marketplace/templates?category=ai_specialist", headers=headers_a ) assert ai_tmpl_resp.status_code == 200 ai_templates = ai_tmpl_resp.json()["data"] assert len(ai_templates) == 6 # 5. Search by keyword search_resp = await async_client.get( "/api/v1/marketplace/templates?search=ecommerce", headers=headers_a ) assert search_resp.status_code == 200 search_results = search_resp.json()["data"] > assert len(search_results) >= 1 E assert 0 >= 1 E + where 0 = len([]) tests/integration/test_marketplace_api.py:63: AssertionError ----------------------------- Captured stdout call ----------------------------- 2026-11-18 09:41:20 [info ] dispatching_domain_event event_id=e6442816-d477-437a-a235-4ef380679356 event_type=UserRegisteredEvent handlers_count=0 2026-11-18 09:41:20 [info ] dispatching_domain_event event_id=93135c36-4df1-43ef-bac8-ab482adc207e event_type=TenantCreatedEvent handlers_count=0 =============================== warnings summary =============================== tests/unit/test_marketplace.py:5 /root/telegram-saas/tests/unit/test_marketplace.py:5: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.unit tests/unit/test_marketplace.py:51 /root/telegram-saas/tests/unit/test_marketplace.py:51: PytestUnknownMarkWarning: Unknown pytest.mark.unit - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html @pytest.mark.unit -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/integration/test_marketplace_api.py::test_marketplace_api_full_lifecycle_and_tenant_isolation =================== 1 failed, 2 passed, 2 warnings in 0.86s ====================