fix(remote): treat declined device authorization as cancellation

This commit is contained in:
Xubin Ren committed 2026-10-02 11:36:34 +08:00
1 parent 3ac60f0780
commit 92b0f1d285
2 files changed
+5 -2

No files matched your search

+2 -1
View File
@@ -114,8 +114,9 @@ def test_readable_config_still_requires_device_authorization(protected):
protected.metadata.side_effect = None
protected.metadata.return_value = {"port": 8765}
result = CliRunner().invoke(remote.app, protected.args + ["--host", "example.com"], input="n\n")
assert result.exit_code == 1
assert result.exit_code == 0
assert "Authorize this computer?" in result.output
assert "Cancelled. No device was authorized" in result.output
assert "Continue as server administrator?" not in result.output
protected.run.assert_not_called()
protected.authorize.assert_not_called()