mirror of https://github.com/akuker/RASCSI.git
Fix bugs and update test
This commit is contained in:
parent
4f953aeaee
commit
1993adba33
|
@ -486,9 +486,9 @@ class FileCmds:
|
|||
|
||||
file_name = PurePath(url).name
|
||||
iso_filename = Path(server_info["image_dir"]) / f"{file_name}.iso"
|
||||
tmp_full_path = Path(tmp_dir) / file_name
|
||||
|
||||
with TemporaryDirectory() as tmp_dir:
|
||||
tmp_full_path = Path(tmp_dir) / file_name
|
||||
req_proc = self.download_to_dir(quote(url, safe=URL_SAFE), tmp_full_path)
|
||||
logging.info("Downloaded %s to %s", file_name, tmp_dir)
|
||||
if not req_proc["status"]:
|
||||
|
|
|
@ -206,4 +206,4 @@ div.throttle-notice > div a:hover {
|
|||
|
||||
label.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
type="application/javascript"
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.js"
|
||||
integrity="PwiT+fWTPpIySx6DrH1FKraKo+LvVpOClsjx0TSdMYTKi7BR1hR149f4VHLUUnfA"
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
|
|
@ -1454,7 +1454,7 @@ def check_backend_auth():
|
|||
abort(
|
||||
403,
|
||||
"PiSCSI is password protected. "
|
||||
"Start the Web Interface with the --password parameter."
|
||||
"Start the Web Interface with the --password parameter.",
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -362,7 +362,7 @@ def test_download_url_to_dir(env, httpserver, http_client, list_files, delete_fi
|
|||
assert file_name in list_files()
|
||||
assert (
|
||||
response_data["messages"][0]["message"]
|
||||
== f"{file_name} downloaded to {env['images_dir']}{subdir}"
|
||||
== f"Downloaded file to {env['images_dir']}{subdir}{file_name}"
|
||||
)
|
||||
|
||||
# Cleanup
|
||||
|
|
Loading…
Reference in New Issue