fix: formatting (black)
Some checks failed
Backend CI / lint-and-test (push) Failing after 1m54s

This commit is contained in:
2025-10-11 21:58:32 +02:00
parent f9086d2d04
commit c35049cd54
7 changed files with 69 additions and 50 deletions

View File

@@ -50,8 +50,7 @@ def test_network_snapshot_prefers_repository_data(
track = sample_entities["track"]
train = sample_entities["train"]
monkeypatch.setattr(StationRepository, "list_active",
lambda self: [station])
monkeypatch.setattr(StationRepository, "list_active", lambda self: [station])
monkeypatch.setattr(TrackRepository, "list_all", lambda self: [track])
monkeypatch.setattr(TrainRepository, "list_all", lambda self: [train])
@@ -59,8 +58,7 @@ def test_network_snapshot_prefers_repository_data(
assert snapshot["stations"]
assert snapshot["stations"][0]["name"] == station.name
assert snapshot["tracks"][0]["lengthMeters"] == pytest.approx(
track.length_meters)
assert snapshot["tracks"][0]["lengthMeters"] == pytest.approx(track.length_meters)
assert snapshot["trains"][0]["designation"] == train.designation
assert snapshot["trains"][0]["operatingTrackIds"] == []
@@ -76,5 +74,4 @@ def test_network_snapshot_falls_back_when_repositories_empty(
assert snapshot["stations"]
assert snapshot["trains"]
assert any(station["name"] ==
"Central" for station in snapshot["stations"])
assert any(station["name"] == "Central" for station in snapshot["stations"])