Release v0.34.0 — Series-4 parity, and most of Blastware's report from the event file alone #59

Merged
serversdown merged 245 commits from dev into main 2026-11-04 18:19:24 -05:00
2 changed files with 18 additions and 3 deletions
Showing only changes of commit d393a149f8 - Show all commits

No files matched your search

+5 -1
View File
@@ -121,7 +121,11 @@ class DeviceAccess:
with self._sessions_guard:
session = self._sessions.get(address.key)
if session is not None and session.serial != serial:
session.hang_up()
if session.is_open:
raise WrongUnit(
f"a Series-4 line to {session.serial} is held at {address.key}; "
f"{serial} cannot be reached there -- POST /device/hangup first "
"if the modem has moved")
session = None
if session is None:
session = Series4Session(address, serial, self._s4_factory, clock=self._clock)
+13 -2
View File
@@ -79,12 +79,23 @@ def test_a_dropped_line_is_called_up_again_quietly():
assert st.series == 4 and second.opened == 1
def test_a_different_serial_at_the_same_address_hangs_up_the_old_line():
def test_a_different_serial_at_a_held_address_is_refused_without_io():
first, second = FakeMicromateClient(), FakeMicromateClient(serial="UM12947")
da = access(s4=[first, second])
da.status(ADDR, "UM20147")
with pytest.raises(WrongUnit, match="hangup"):
da.status(ADDR, "UM12947")
assert first.closed == 0 and second.opened == 0
assert da.held_serial(ADDR) == "UM20147"
def test_a_different_serial_replaces_a_session_that_is_no_longer_open():
first, second = FakeMicromateClient(), FakeMicromateClient(serial="UM12947")
da = access(s4=[first, second])
da.status(ADDR, "UM20147")
first.close()
da.status(ADDR, "UM12947")
assert first.closed == 1 and second.opened == 1
assert second.opened == 1
def test_a_busy_unit_answers_423_without_a_second_connection():