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 testpaths: tests 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 63 items tests/integration/test_auth.py::test_auth_workflow PASSED [ 1%] tests/integration/test_celery_telegram_tasks.py::test_telegram_update_task_execution PASSED [ 3%] tests/integration/test_emojis_api.py::test_search_emojis_by_term PASSED [ 4%] tests/integration/test_emojis_api.py::test_search_emojis_by_category PASSED [ 6%] tests/integration/test_emojis_api.py::test_get_categories_list PASSED [ 7%] tests/integration/test_emojis_api.py::test_bulk_emoji_import_and_packs_management PASSED [ 9%] tests/integration/test_health.py::test_health_liveness PASSED [ 11%] tests/integration/test_health.py::test_health_readiness PASSED [ 12%] tests/integration/test_i18n_api.py::test_get_locales_list PASSED [ 14%] tests/integration/test_i18n_api.py::test_get_translation_bundle PASSED [ 15%] tests/integration/test_i18n_api.py::test_update_user_locale PASSED [ 17%] tests/integration/test_i18n_api.py::test_save_custom_translation_override PASSED [ 19%] tests/integration/test_i18n_api.py::test_audit_translations_and_missing_keys FAILED [ 20%] tests/integration/test_i18n_api.py::test_ai_translation_and_human_approval_workflow FAILED [ 22%] tests/integration/test_message_studio_api.py::test_bot_message_studio_lifecycle PASSED [ 23%] tests/integration/test_message_studio_e2e_publishing.py::test_message_studio_publishing_changes_real_bot_response PASSED [ 25%] tests/integration/test_multi_bot_engine.py::test_multi_tenant_multi_bot_engine_lifecycle PASSED [ 26%] tests/integration/test_multilingual_bot_responses.py::test_language_selection_in_actual_bot_responses PASSED [ 28%] tests/integration/test_text_designer_api.py::test_text_designer_api_endpoints PASSED [ 30%] tests/tenant_isolation/test_tenant_isolation.py::test_strict_tenant_isolation PASSED [ 31%] tests/unit/test_bot_engine.py::test_bot_token_validation_with_getme PASSED [ 33%] tests/unit/test_bot_engine.py::test_bot_token_encryption_and_decryption PASSED [ 34%] tests/unit/test_bot_engine.py::test_webhook_secret_generation_and_verification PASSED [ 36%] tests/unit/test_bot_engine.py::test_rate_limit_retry_handling PASSED [ 38%] tests/unit/test_emojis.py::test_telegram_html_emoji_formatting PASSED [ 39%] tests/unit/test_emojis.py::test_telegram_markdown_emoji_formatting PASSED [ 41%] tests/unit/test_emojis.py::test_id_precision_is_preserved_as_string PASSED [ 42%] tests/unit/test_emojis.py::test_custom_emoji_validation PASSED [ 44%] tests/unit/test_formatter_and_engine.py::test_box_header_formatting PASSED [ 46%] tests/unit/test_formatter_and_engine.py::test_separator_presets PASSED [ 47%] tests/unit/test_formatter_and_engine.py::test_info_block_formatting PASSED [ 49%] tests/unit/test_formatter_and_engine.py::test_progress_bar_generation PASSED [ 50%] tests/unit/test_formatter_and_engine.py::test_progress_step_header PASSED [ 52%] tests/unit/test_formatter_and_engine.py::test_telegram_message_builder PASSED [ 53%] tests/unit/test_i18n.py::test_supported_locales_catalog PASSED [ 55%] tests/unit/test_i18n.py::test_rtl_detection PASSED [ 57%] tests/unit/test_i18n.py::test_plural_rules PASSED [ 58%] tests/unit/test_i18n.py::test_formatting PASSED [ 60%] tests/unit/test_i18n.py::test_fallback_resolution PASSED [ 61%] tests/unit/test_i18n.py::test_translation_engine PASSED [ 63%] tests/unit/test_i18n.py::test_bcp47_locale_normalization PASSED [ 65%] tests/unit/test_i18n.py::test_interpolation PASSED [ 66%] tests/unit/test_i18n.py::test_missing_translation_fallback PASSED [ 68%] tests/unit/test_i18n.py::test_telegram_keyboard_builder PASSED [ 69%] tests/unit/test_message_studio.py::test_variable_interpolation PASSED [ 71%] tests/unit/test_message_studio.py::test_missing_variables_fallback PASSED [ 73%] tests/unit/test_message_studio.py::test_keyboard_matrix_ordering PASSED [ 74%] tests/unit/test_message_studio.py::test_aiogram_keyboard_generation PASSED [ 76%] tests/unit/test_message_studio.py::test_default_system_templates PASSED [ 77%] tests/unit/test_security.py::test_password_hashing PASSED [ 79%] tests/unit/test_security.py::test_aes_256_gcm_encryption PASSED [ 80%] tests/unit/test_security.py::test_jwt_tokens PASSED [ 82%] tests/unit/test_security.py::test_token_hashing PASSED [ 84%] tests/unit/test_unicode_styler.py::test_small_caps_transformation PASSED [ 85%] tests/unit/test_unicode_styler.py::test_tag_and_variable_preservation PASSED [ 87%] tests/unit/test_unicode_styler.py::test_other_unicode_styles PASSED [ 88%] tests/unit/test_unicode_styler.py::test_symbol_catalog_contents PASSED [ 90%] tests/unit/test_validators_and_presets.py::test_html_validator_valid PASSED [ 92%] tests/unit/test_validators_and_presets.py::test_html_validator_invalid_tags PASSED [ 93%] tests/unit/test_validators_and_presets.py::test_html_validator_unclosed_tags PASSED [ 95%] tests/unit/test_validators_and_presets.py::test_message_length_validator PASSED [ 96%] tests/unit/test_validators_and_presets.py::test_callback_data_validator PASSED [ 98%] tests/unit/test_validators_and_presets.py::test_preset_manager_loads_all_presets PASSED [100%] =================================== FAILURES =================================== ___________________ test_audit_translations_and_missing_keys ___________________ async_client = @pytest.mark.asyncio async def test_audit_translations_and_missing_keys(async_client: AsyncClient): # 1. Audit all 16 locales audit_resp = await async_client.get("/api/v1/i18n/audit") assert audit_resp.status_code == 200 summary = audit_resp.json()["data"] assert summary["total_locales"] == 16 > assert summary["overall_coverage"] == 100.0 E assert 97.41 == 100.0 tests/integration/test_i18n_api.py:88: AssertionError _______________ test_ai_translation_and_human_approval_workflow ________________ async_client = @pytest.mark.asyncio async def test_ai_translation_and_human_approval_workflow(async_client: AsyncClient): email = f"reviewer_{uuid.uuid4().hex[:6]}@example.com" reg_resp = await async_client.post( "/api/v1/auth/register", json={"email": email, "password": "Password123!", "full_name": "Reviewer Pro"}, ) token = reg_resp.json()["data"]["access_token"] headers = {"Authorization": f"Bearer {token}"} # 1. Request AI translation suggestion ai_req = { "key": "order_confirmed", "source_text": "Your order #{order_id} has been confirmed!", "source_locale": "en", "target_locale": "hi", "namespace": "bot", "auto_save_as_pending": True, } ai_resp = await async_client.post("/api/v1/i18n/ai/translate", headers=headers, json=ai_req) assert ai_resp.status_code == 200 ai_data = ai_resp.json()["data"] assert ai_data["is_approved"] is False assert "{order_id}" in ai_data["suggested_translation"] trans_id = ai_data["translation_id"] assert trans_id is not None # 2. List pending translations pending_resp = await async_client.get("/api/v1/i18n/translations/pending", headers=headers) assert pending_resp.status_code == 200 pending_list = pending_resp.json()["data"] > pending_ids = [p["id"] for p in pending_list] ^^^^^^^ E TypeError: string indices must be integers, not 'str' tests/integration/test_i18n_api.py:134: TypeError ----------------------------- Captured stdout call ----------------------------- 2026-11-18 08:26:37 [info ] dispatching_domain_event event_id=6c16f863-de2e-4d3d-974e-e933ecdd808e event_type=UserRegisteredEvent handlers_count=0 =========================== short test summary info ============================ FAILED tests/integration/test_i18n_api.py::test_audit_translations_and_missing_keys FAILED tests/integration/test_i18n_api.py::test_ai_translation_and_human_approval_workflow ========================= 2 failed, 61 passed in 5.85s =========================