Created At: 2026-11-18T07:53:50Z Completed At: 2026-11-18T07:53:55Z 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_celery_telegram_tasks.py::test_celery_telegram_update_task_execution FAILED [100%] =================================== FAILURES =================================== __________________ test_celery_telegram_update_task_execution __________________ db_session = @pytest.mark.asyncio async def test_celery_telegram_update_task_execution(db_session: AsyncSession): # 1. Create Tenant tenant_id = uuid.uuid4() tenant = Tenant( id=tenant_id, name="Celery Task Tenant", slug=f"celery-tenant-{uuid.uuid4().hex[:6]}", status="active", plan_id="enterprise", ) db_session.add(tenant) await db_session.commit() # 2. Register mock bot token = f"celery_test_token_{uuid.uuid4().hex[:8]}_test" TelegramApiService.register_mock_bot(token, "celery_bot", "Celery Bot") service = BotService(db_session) > bot = await service.register_bot( tenant_id=tenant_id, req=BotRegisterRequest(token=token, name="Celery Bot", default_locale="en"), ) tests/integration/test_celery_telegram_tasks.py:32: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = tenant_id = UUID('5d400366-85da-442d-8096-dcb673d0fd90') req = BotRegisterRequest(token='celery_test_token_317d0fcd_test', name='Celery Bot', default_locale='en', settings=None) async def register_bot(self, tenant_id: UUID, req: BotRegisterRequest) -> Bot: # 1. Validate token with Telegram API getMe bot_info = await TelegramApiService.validate_token(req.token) username = bot_info.get("username", "").lstrip("@") if not username: raise ValidationError("Telegram bot did not return a valid username") # 2. Check if username is already registered globally existing = await self.repo.get_by_username(username) if existing: > raise ConflictError(f"Telegram bot @{username} is already registered on this platform") E core.exceptions.ConflictError: Telegram bot @celery_bot is already registered on this platform modules/bots/service.py:44: ConflictError =========================== short test summary info ============================ FAILED tests/integration/test_celery_telegram_tasks.py::test_celery_telegram_update_task_execution ============================== 1 failed in 0.44s ===============================