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 1 item tests/integration/test_bot_modular_api_and_execution.py::test_bot_modular_api_and_execution_lifecycle FAILED [100%] =================================== FAILURES =================================== _________________ test_bot_modular_api_and_execution_lifecycle _________________ async_client = db_session = @pytest.mark.asyncio async def test_bot_modular_api_and_execution_lifecycle( async_client: AsyncClient, db_session: AsyncSession, ): # -------------------------------------------------------------------------- # 1. Setup Tenant, User, and Bot # -------------------------------------------------------------------------- user_email = f"mod_dev_{uuid.uuid4().hex[:6]}@example.com" reg_resp = await async_client.post( "/api/v1/auth/register", json={"email": user_email, "password": "PasswordM123!", "full_name": "Modular Dev"}, ) user_token = reg_resp.json()["data"]["access_token"] tenant_resp = await async_client.post( "/api/v1/tenants", headers={"Authorization": f"Bearer {user_token}"}, json={"name": "Modular Fleet Org", "slug": f"mod-{uuid.uuid4().hex[:6]}"}, ) tenant_id = uuid.UUID(tenant_resp.json()["data"]["id"]) headers = { "Authorization": f"Bearer {user_token}", "X-Tenant-ID": str(tenant_id), } # Register Bot bot_token = f"token_modular_{uuid.uuid4().hex[:8]}_test" bot_username = f"modular_bot_{uuid.uuid4().hex[:6]}" TelegramApiService.register_mock_bot(bot_token, bot_username, "Modular Bot") bot_reg_resp = await async_client.post( "/api/v1/bots", headers=headers, json={"token": bot_token, "name": "Nexus Modular Bot", "default_locale": "en"}, ) assert bot_reg_resp.status_code == 201 bot_data = bot_reg_resp.json()["data"] bot_id = uuid.UUID(bot_data["id"]) # -------------------------------------------------------------------------- # 2. Query Bot Modules API: GET /api/v1/bots/{bot_id}/modules # -------------------------------------------------------------------------- modules_resp = await async_client.get(f"/api/v1/bots/{bot_id}/modules", headers=headers) assert modules_resp.status_code == 200 mods = modules_resp.json()["data"] > assert len(mods) == 10 E AssertionError: assert 11 == 10 E + where 11 = len([{'id': 'welcome_message', 'name': 'Welcome Message & Onboarding', 'category': 'engagement', 'icon': 'sparkles', ...}, {'id': 'force_join', 'name': 'Force Join Channel Guard', 'category': 'security', 'icon': 'shield-check', ...}, {'id': 'referrals', 'name': 'Referral & Viral Growth Engine', 'category': 'growth', 'icon': 'share-2', ...}, {'id': 'redeem_codes', 'name': 'Redeem Codes & Gift Vouchers', 'category': 'monetization', 'icon': 'gift', ...}, {'id': 'broadcasts', 'name': 'Broadcast & Announcement Pipeline', 'category': 'messaging', 'icon': 'radio', ...}, {'id': 'user_management', 'name': 'Audience & Subscriber Directory', 'category': 'management', 'icon': 'users', ...}, ...]) tests/integration/test_bot_modular_api_and_execution.py:59: AssertionError ----------------------------- Captured stdout call ----------------------------- 2026-11-19 05:03:50 [info ] dispatching_domain_event event_id=06a172cf-310b-4e9a-9b28-08952cdaf173 event_type=TenantCreatedEvent handlers_count=1 2026-11-19 05:03:50 [info ] domain_event_recorded event_id=06a172cf-310b-4e9a-9b28-08952cdaf173 event_type=TenantCreatedEvent tenant_id=c77112b6-b5ba-4d7e-b51c-901d517a21b3 user_id=None 2026-11-19 05:03:50 [info ] dispatching_domain_event event_id=94d487ed-1103-4fd2-ad1b-e54369c4706a event_type=UserRegisteredEvent handlers_count=1 2026-11-19 05:03:50 [info ] domain_event_recorded event_id=94d487ed-1103-4fd2-ad1b-e54369c4706a event_type=UserRegisteredEvent tenant_id=None user_id=1573a178-deeb-402d-9184-b3fb127f9ebb 2026-11-19 05:03:50 [info ] dispatching_domain_event event_id=f4aa1e34-dcdb-4b32-b0f6-7f3b1851856a event_type=TenantCreatedEvent handlers_count=1 2026-11-19 05:03:50 [info ] domain_event_recorded event_id=f4aa1e34-dcdb-4b32-b0f6-7f3b1851856a event_type=TenantCreatedEvent tenant_id=16c1902d-fbaf-4704-9a94-a44036b282f2 user_id=None 2026-11-19 05:03:50 [info ] bot_registered_successfully bot_id=337a3608-62f3-4757-9f5d-4cc79dd59a99 tenant_id=16c1902d-fbaf-4704-9a94-a44036b282f2 username=modular_bot_e7ad67 =========================== short test summary info ============================ FAILED tests/integration/test_bot_modular_api_and_execution.py::test_bot_modular_api_and_execution_lifecycle ============================== 1 failed in 1.21s ===============================