Fix links

This commit is contained in:
Penguinehis
2026-09-29 10:18:56 -03:00
parent b4a8a70e54
commit 4673f8c58e
6 changed files with 88 additions and 33 deletions
+10
View File
@@ -116,6 +116,16 @@ class TokenManagementTest(unittest.TestCase):
with self.assertRaisesRegex(cli.CLIError, "native"):
cli.xray_shared_port()
def test_git_update_uses_installed_updater_without_prompt(self):
updater = Path(self.temp.name) / "update.sh"
updater.write_text("#!/bin/bash\n")
with patch.object(cli, "INSTALL_DIR", Path(self.temp.name)), \
patch.object(cli.subprocess, "run", return_value=SimpleNamespace(returncode=0)) as run, \
patch("builtins.input", side_effect=AssertionError("prompted")), \
redirect_stdout(io.StringIO()):
cli.update_from_git()
run.assert_called_once_with(["bash", str(updater)], check=False)
if __name__ == "__main__":
unittest.main()