Harden route-aware browser lifecycle

This commit is contained in:
jwinterm
2026-07-08 12:55:31 -04:00
parent 3c1183507c
commit 97a43f8572
7 changed files with 190 additions and 19 deletions
+8
View File
@@ -118,6 +118,14 @@ class CliOpenTest(unittest.TestCase):
self.assertIn("profile_path=.ampb/profiles/route-aware", output)
self.assertIn("pac_path=.ampb/profiles/route-aware/ampb-proxy.pac", output)
def test_hidden_helper_command_passes_watch_pid(self) -> None:
with patch("ampbrowser.cli.serve_route_helper") as helper:
code = main(["helper", "--port", "44001", "--token", "test-token", "--watch-pid", "9876"])
self.assertEqual(0, code)
helper.assert_called_once()
self.assertEqual(9876, helper.call_args.kwargs["watch_pid"])
if __name__ == "__main__":
unittest.main()