Improve Web UI integration tests (#939)

* Remove deprecated critital log level from test

* Move drive_properties back into template data sets

* Move properties data integrity checks to test code

* Streamline the drive formatting logic
This commit is contained in:
Daniel Markstedt
2022-10-25 08:51:04 -07:00
committed by GitHub
parent 6bbaa956ed
commit 4b109a70b0
6 changed files with 33 additions and 37 deletions
+13
View File
@@ -39,6 +39,19 @@ def test_show_named_drive_presets(http_client):
response = http_client.get("/drive/list")
response_data = response.json()
prev_drive = {"name": ""}
for drive in (
response_data["data"]["drive_properties"]["hd_conf"]
+ response_data["data"]["drive_properties"]["cd_conf"]
+ response_data["data"]["drive_properties"]["rm_conf"]
+ response_data["data"]["drive_properties"]["mo_conf"]
):
# Test that the named drive has a name
assert drive["name"] != ""
# Test that "name" is unique for each named drive
assert drive["name"] != prev_drive["name"]
prev_drive = drive
assert response.status_code == 200
assert response_data["status"] == STATUS_SUCCESS
assert "files" in response_data["data"]