refactor(tests): Simplify test setup and fix client fixture
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-08-23 22:36:23 +01:00
parent 1a2f9f9ff4
commit 6fc14db51e
5 changed files with 21 additions and 34 deletions

View File

@@ -19,17 +19,18 @@ steps:
commands:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
# --- ИЗМЕНЕНИЕ ЗДЕСЬ ---
- name: testing
image: python:3.11-slim
# Передаем фейковые секреты напрямую в окружение этого шага
environment:
YANDEX_CLIENT_ID: "test_id_from_drone"
YANDEX_CLIENT_SECRET: "test_secret_from_drone"
commands:
# Команды создания .env.test больше не нужны
# 1. Создаем .env файл. pydantic-settings его найдет и использует.
- echo 'YANDEX_CLIENT_ID="test_id"' > .env
- echo 'YANDEX_CLIENT_SECRET="test_secret"' >> .env
# 2. Устанавливаем зависимости
- pip install poetry
- poetry install
# 3. Запускаем тесты
- poetry run pytest -v
- name: deploy