Cover the balance entry path and three unguarded rules

Entering a parent's Försäkringskassan balances had no tests at all, despite
being how every number in the planner originates and despite it becoming the
first thing a new user does. The scraper endpoints are pinned per test rather
than read from the ambient configuration, because a local .env sets the flag
opposite to the shipped default and a test that trusts it would pass here and
fail in CI.

Also covered: the hard expiry at twelve, whose rejection path nothing reached
and whose boundary turns out to be inclusive; and the dubbeldagar count cap,
which now drives past the limit and asserts the days beyond it fall back to a
single parent. Two weak assertions were strengthened, including one that
derived its expectation from the same response it was checking and so could
not have failed on a shared error.
This commit is contained in:
2026-09-17 19:46:03 +02:00
parent 9d548da7d6
commit 0fc71101ae
6 changed files with 732 additions and 2 deletions
+1
View File
@@ -132,6 +132,7 @@ class TestGetHolidayName:
"""Get name of New Year's Day."""
name = get_holiday_name(datetime.date(2026, 1, 1))
assert name is not None
assert "Nyår" in name
def test_midsummer_name(self) -> None:
"""Get name of Midsummer."""