Commit 38a6558f authored by Jérome Perrin's avatar Jérome Perrin

test_cli: fix mock wrong method

this test checks "slapos node boot" which calls check_root_user after
importing it in slapos.cli.boot, so we should patch in that module.
parent cb6a3fce
...@@ -316,7 +316,7 @@ class TestCliBoot(CliMixin): ...@@ -316,7 +316,7 @@ class TestCliBoot(CliMixin):
# run slapos node boot # run slapos node boot
app = slapos.cli.entry.SlapOSApp() app = slapos.cli.entry.SlapOSApp()
with patch('slapos.cli.command.check_root_user', return_value=True) as check_root_user,\ with patch('slapos.cli.boot.check_root_user', return_value=True) as check_root_user,\
patch('slapos.cli.boot.SlapOSApp') as SlapOSApp,\ patch('slapos.cli.boot.SlapOSApp') as SlapOSApp,\
patch('slapos.cli.boot.ConfigCommand.config_path', return_value=slapos_conf.name), \ patch('slapos.cli.boot.ConfigCommand.config_path', return_value=slapos_conf.name), \
patch( patch(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment