fix(tests): compare UUID objects not str in DATEV coverage test
Security Audit / Python Dependency Audit (push) Canceled after 0s
Security Audit / Node.js Dependency Audit (push) Canceled after 0s
Security Audit / Frontend Build (tsc + vite) (push) Canceled after 0s

report_service.datev_monthly_report compares user.company_id (uuid.UUID)
against the passed company_id with != — a plain str from the JSON API
response never equals the UUID, so it always looked like a mismatch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Ahyx6D3r7G1EuAc42nezn
This commit is contained in:
2026-09-02 23:34:12 +02:00
co-authored by Claude Sonnet 5
parent 55d54e0ff0
commit dd044793c6
+3 -2
View File
@@ -445,8 +445,9 @@ async def test_datev_holiday_takes_precedence_over_vacation(
from app.services.holiday_service import ensure_holidays_for_year from app.services.holiday_service import ensure_holidays_for_year
from app.services.report_service import report_service from app.services.report_service import report_service
company_id = cov_company["user"]["company_id"] from uuid import UUID as _UUID
user_id = cov_company["user"]["id"] company_id = _UUID(cov_company["user"]["company_id"])
user_id = _UUID(cov_company["user"]["id"])
r = await client.patch("/api/v1/companies/me", json={"state": "BY"}, headers=cov_headers) r = await client.patch("/api/v1/companies/me", json={"state": "BY"}, headers=cov_headers)
assert r.status_code == 200, r.text assert r.status_code == 200, r.text