Attach empty removable drives in the Web UI (#877)

* Read the drive properties file once and store it in the Flask app config. Spin out the drive properties formatting to a helper method.

* Add empty removable disk drives to the attach peripherals UI

* Refinement of UI labels and help text, moving some context to the wiki
This commit is contained in:
Daniel Markstedt
2022-10-01 16:51:30 -07:00
committed by GitHub
parent 255a6e139f
commit d969fbdcce
8 changed files with 187 additions and 84 deletions

View File

@@ -4,7 +4,6 @@ import os
from conftest import (
IMAGES_DIR,
AFP_DIR,
SCSI_ID,
FILE_SIZE_1_MIB,
STATUS_SUCCESS,
@@ -201,10 +200,7 @@ def test_upload_file(http_client, delete_file):
def test_download_file(http_client, create_test_image):
file_name = create_test_image()
response = http_client.post(
"/files/download",
data={"file": f"{IMAGES_DIR}/{file_name}"}
)
response = http_client.post("/files/download", data={"file": f"{IMAGES_DIR}/{file_name}"})
assert response.status_code == 200
assert response.headers["content-type"] == "application/octet-stream"