fix(tests): compare UUID objects not str in DATEV coverage test
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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user