Skip to content

Commit

Permalink
Make test reflect changed output from Legislation
Browse files Browse the repository at this point in the history
  • Loading branch information
dragon-dxw committed Sep 19, 2024
1 parent a5b8904 commit 71b09d1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## v6.0.1 (2024-07-16)

- Fix CI by reflecting changed output from legislation SPARQL output

### Refactor

- **FCL-176**: explicitly set timezones to UTC
Expand Down
2 changes: 1 addition & 1 deletion src/lambdas/determine_legislation_provisions/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_timestamp_and_engine_version(
"uk:tna-enrichment-engine",
attrs={"xmlns:uk": "https://caselaw.nationalarchives.gov.uk/akn"},
)
enrichment_version.string = "6.0.0"
enrichment_version.string = "6.0.1"

if not soup.proprietary:
raise SourceXMLMissingElement("This document does not have a <proprietary> element.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

from ..fetch_legislation import fetch_legislation

# Do not truncate debug output
pd.set_option("display.max_rows", None)
pd.set_option("display.max_columns", None)
pd.set_option("display.max_colwidth", None)


@pytest.fixture(scope="module")
def set_env_vars():
Expand Down Expand Up @@ -52,37 +57,37 @@ def test_fetch_legislation_integration(mock_datetime, set_env_vars) -> None:
expected_df = pd.DataFrame(
{
"ref": [
"http://www.legislation.gov.uk/id/ukpga/2023/8",
"http://www.legislation.gov.uk/id/ukpga/2023/8",
"http://www.legislation.gov.uk/id/ukpga/2023/10",
"http://www.legislation.gov.uk/id/ukpga/2023/10",
"http://www.legislation.gov.uk/id/ukpga/2023/8",
"http://www.legislation.gov.uk/id/ukpga/2023/8",
],
"title": [
"Seafarers Wages Act 2023",
"Seafarers Wages Act 2023",
"UK Infrastructure Bank Act 2023",
"UK Infrastructure Bank Act 2023",
"Seafarers Wages Act 2023",
"Seafarers Wages Act 2023",
],
"ref_version": [
"http://www.legislation.gov.uk/ukpga/2023/10",
"http://www.legislation.gov.uk/ukpga/2023/10",
"http://www.legislation.gov.uk/ukpga/2023/8/enacted",
"http://www.legislation.gov.uk/ukpga/2023/8/enacted",
"http://www.legislation.gov.uk/ukpga/2023/10/enacted",
"http://www.legislation.gov.uk/ukpga/2023/10/enacted",
],
"shorttitle": [
"Seafarers Wages Act 2023",
"Seafarers Wages Act 2023",
"UK Infrastructure Bank Act 2023",
"UK Infrastructure Bank Act 2023",
"Seafarers Wages Act 2023",
"Seafarers Wages Act 2023",
],
"citation": ["2023 c. 8", "2023 c. 8", "2023 c. 10", "2023 c. 10"],
"citation": ["2023 c. 10", "2023 c. 10", "2023 c. 8", "2023 c. 8"],
"acronymcitation": [np.nan, np.nan, np.nan, np.nan],
"year": [2023, 2023, 2023, 2023],
"candidate_titles": [
"Seafarers Wages Act 2023",
"2023 c. 8",
"UK Infrastructure Bank Act 2023",
"2023 c. 10",
"Seafarers Wages Act 2023",
"2023 c. 8",
],
"for_fuzzy": [True, False, True, False],
},
Expand Down

0 comments on commit 71b09d1

Please sign in to comment.