mirror of
https://github.com/akuker/RASCSI.git
synced 2024-06-02 11:41:34 +00:00
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
|
file_name = PurePath(url).name
|
||||||
iso_filename = Path(server_info["image_dir"]) / f"{file_name}.iso"
|
iso_filename = Path(server_info["image_dir"]) / f"{file_name}.iso"
|
||||||
tmp_full_path = Path(tmp_dir) / file_name
|
|
||||||
|
|
||||||
with TemporaryDirectory() as tmp_dir:
|
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)
|
req_proc = self.download_to_dir(quote(url, safe=URL_SAFE), tmp_full_path)
|
||||||
logging.info("Downloaded %s to %s", file_name, tmp_dir)
|
logging.info("Downloaded %s to %s", file_name, tmp_dir)
|
||||||
if not req_proc["status"]:
|
if not req_proc["status"]:
|
||||||
|
|
|
@ -206,4 +206,4 @@ div.throttle-notice > div a:hover {
|
||||||
|
|
||||||
label.hidden {
|
label.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
type="application/javascript"
|
type="application/javascript"
|
||||||
src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.js"
|
src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.9.3/min/dropzone.min.js"
|
||||||
integrity="PwiT+fWTPpIySx6DrH1FKraKo+LvVpOClsjx0TSdMYTKi7BR1hR149f4VHLUUnfA"
|
integrity="PwiT+fWTPpIySx6DrH1FKraKo+LvVpOClsjx0TSdMYTKi7BR1hR149f4VHLUUnfA"
|
||||||
|
crossorigin="anonymous"
|
||||||
></script>
|
></script>
|
||||||
|
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
|
|
@ -1454,7 +1454,7 @@ def check_backend_auth():
|
||||||
abort(
|
abort(
|
||||||
403,
|
403,
|
||||||
"PiSCSI is password protected. "
|
"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 file_name in list_files()
|
||||||
assert (
|
assert (
|
||||||
response_data["messages"][0]["message"]
|
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
|
# Cleanup
|
||||||
|
|
Loading…
Reference in New Issue
Block a user