mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-08-03 05:18:22 +00:00
List the UPRNs with no SharePoint folder under any root 🟥
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
371df4d54f
commit
9e48f39fa5
1 changed files with 27 additions and 0 deletions
|
|
@ -296,6 +296,33 @@ def test_run_warns_once_when_property_missing_from_all_roots(
|
|||
assert "400" in warnings[0].message
|
||||
|
||||
|
||||
def test_run_summary_lists_uprns_with_no_folder_under_any_root(
|
||||
tmp_path: Path,
|
||||
) -> None:
|
||||
# Arrange
|
||||
csv_path = _write_csv(
|
||||
tmp_path, [("400", "4 Elm St", "AA2 2BB"), ("500", "5 Pine Ln", "BB3 3CC")]
|
||||
)
|
||||
found_assessment = _assessment_path(BASE_PATH, "5 Pine Ln", "BB3 3CC")
|
||||
|
||||
sp = MagicMock()
|
||||
|
||||
def fake_get(path: str) -> dict[str, Any]:
|
||||
if path == BASE_PATH:
|
||||
return {"value": []}
|
||||
if path == found_assessment:
|
||||
return {"value": []}
|
||||
raise ValueError("not found")
|
||||
|
||||
sp.get_folders_in_path.side_effect = fake_get
|
||||
|
||||
# Act
|
||||
summary = SharepointRenamerOrchestrator(sp, csv_path).run()
|
||||
|
||||
# Assert
|
||||
assert summary.missing_folders == ["400"]
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# _process_folder — already-canonical files are skipped
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue