Retain K1 connection between scans and admit the next named acquisition
This commit is contained in:
@@ -438,10 +438,26 @@ def test_applied_wifi_does_not_grant_control_or_start_authority():
|
||||
assert item["control"]["reason_code"] is None
|
||||
|
||||
|
||||
def test_one_start_intent_preserves_canonical_enter_prepare_start_sequence():
|
||||
@pytest.mark.parametrize("initial_phase", ["connection-ready", "completed"])
|
||||
@pytest.mark.parametrize("pending_start", [False, True])
|
||||
def test_one_start_intent_preserves_canonical_enter_prepare_start_sequence(
|
||||
initial_phase, pending_start,
|
||||
):
|
||||
async def run():
|
||||
device = bridge()
|
||||
device.facade.current["application_control_session"]["state"] = initial_phase
|
||||
sensor = NodeK1Sensor(device, None)
|
||||
original_invoke = device.invoke
|
||||
|
||||
async def invoke(action, parameters, operation_id):
|
||||
result = await original_invoke(action, parameters, operation_id)
|
||||
if action == "acquisition.start" and pending_start:
|
||||
result["application_control_session"]["physical_command"] = {
|
||||
"requires_reconciliation": True,
|
||||
}
|
||||
return result
|
||||
|
||||
device.invoke = invoke
|
||||
item = project_sensor(state(), "node-test")
|
||||
command = {
|
||||
"operation_id": "op_" + "a" * 32,
|
||||
|
||||
Reference in New Issue
Block a user