Allow deleting of UI only

This commit is contained in:
Matthias
2021-01-16 10:15:27 +01:00
parent ddc99553bd
commit f05f2c45e8
4 changed files with 29 additions and 6 deletions

View File

@@ -565,11 +565,24 @@ def test_start_install_ui(mocker):
args = [
"install-ui",
]
start_install_ui(args)
start_install_ui(get_args(args))
assert clean_mock.call_count == 1
assert get_url_mock.call_count == 1
assert download_mock.call_count == 1
clean_mock.reset_mock()
get_url_mock.reset_mock()
download_mock.reset_mock()
args = [
"install-ui",
"--erase",
]
start_install_ui(get_args(args))
assert clean_mock.call_count == 1
assert get_url_mock.call_count == 0
assert download_mock.call_count == 0
def test_clean_ui_subdir(mocker, tmpdir, caplog):
mocker.patch("freqtrade.commands.deploy_commands.Path.is_dir",