Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/hb-capital-threshold-history.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Corrected the ordinary pension-age Housing Benefit capital threshold history to £6,000 before 2 November 2009 and £10,000 thereafter.
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ metadata:
- title: The Housing Benefit (Persons who have attained the qualifying age for state pension credit) Regulations 2006 reg. 29(2)
href: https://www.legislation.gov.uk/uksi/2006/214/regulation/29
values:
2006-04-10: 10000
2006-04-10:
value: 6000
reference:
- title: The Housing Benefit (Persons who have attained the qualifying age for state pension credit) Regulations 2006, regulation 29(2)(b) as made
href: https://www.legislation.gov.uk/uksi/2006/214/regulation/29/made
2009-11-02:
value: 10000
reference:
- title: The Social Security (Deemed Income from Capital) Regulations 2009, regulations 1 and 5
href: https://www.legislation.gov.uk/uksi/2009/1676/made
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""Ordinary pension-age HB capital history, before fiscal-year conversion."""

from pathlib import Path

import pytest
import yaml
from policyengine_core.parameters import Parameter

PARAMETER_PATH = (
Path(__file__).resolve().parents[1]
/ "parameters/gov/dwp/housing_benefit/means_test/capital/pension_age"
/ "tariff_income/threshold.yaml"
)


@pytest.mark.parametrize(
"instant, expected",
[
("2006-04-10", 6000),
("2009-11-01", 6000),
("2009-11-02", 10000),
("2015-04-30", 10000),
("2026-04-30", 10000),
],
)
def test_ordinary_threshold_history(instant, expected):
# Read the enacted calendar history: annual model conversion starts in 2015.
# SI 2006/214 reg 29(2)(b), replaced by SI 2009/1676 regs 1 and 5.
data = yaml.safe_load(PARAMETER_PATH.read_text())
data["values"] = {str(date): value for date, value in data["values"].items()}
threshold = Parameter("pension_age_tariff_threshold", data=data)
assert threshold(instant) == expected
Loading