Fix links
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user