mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
missing street is not included in address string 🟥
This commit is contained in:
parent
069e6693ae
commit
25aa57e4b6
2 changed files with 136757 additions and 0 deletions
136742
backend/magic_plan/magicplan_api_plan_response_example_4.json
Normal file
136742
backend/magic_plan/magicplan_api_plan_response_example_4.json
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -210,3 +210,18 @@ def test_plan3_address_uses_street_number_and_omits_city(plan3: Plan):
|
|||
|
||||
def test_plan3_postcode(plan3: Plan):
|
||||
assert plan3.postcode == "BR2 8BZ"
|
||||
|
||||
|
||||
# --- Fixture 4: street_number set, street absent ---
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def plan4() -> Plan:
|
||||
payload = json.loads(
|
||||
(FIXTURE_DIR / "magicplan_api_plan_response_example_4.json").read_text()
|
||||
)
|
||||
return map_plan(MagicPlan.model_validate(payload["data"]))
|
||||
|
||||
|
||||
def test_plan4_address_uses_street_number_when_street_absent(plan4: Plan):
|
||||
assert plan4.address == "2, Bromley, GB"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue