mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-08-03 05:18:22 +00:00
Build the handler test's address list without a shared mutable default 🟪
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bbb3c9e057
commit
bf1f5693be
1 changed files with 4 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ from collections.abc import Generator, Iterator
|
|||
from contextlib import contextmanager
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Any, Callable, cast
|
||||
from typing import Any, Callable, Optional, cast
|
||||
from uuid import UUID
|
||||
|
||||
import pytest
|
||||
|
|
@ -122,12 +122,14 @@ def _install(
|
|||
tmp_path: Path,
|
||||
sharepoint: FakeSharepoint,
|
||||
*,
|
||||
rows: list[tuple[str, str, str]] = [(UPRN, ADDRESS, POSTCODE)],
|
||||
rows: Optional[list[tuple[str, str, str]]] = None,
|
||||
) -> None:
|
||||
"""Point the handler at the fake SharePoint and a small address list, and
|
||||
configure the site the tests target."""
|
||||
import applications.sharepoint_renamer.handler as module
|
||||
|
||||
rows = rows if rows is not None else [(UPRN, ADDRESS, POSTCODE)]
|
||||
|
||||
monkeypatch.setenv(f"{SITE}_SHAREPOINT_ID", "test-site-id")
|
||||
|
||||
def client_for(_site: DomnaSites) -> FakeSharepoint:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue