Introduce utility method to look up drive props by drive name. (#888)

* Introduce utility method to look up drive props by drive name.

* Make /drive/create endpoint fetch file ending from properties data structure; update tests
This commit is contained in:
Daniel Markstedt
2022-10-06 14:04:41 -07:00
committed by GitHub
parent 52ebb3a2ae
commit 90ace5fd53
4 changed files with 64 additions and 60 deletions
+2 -9
View File
@@ -52,10 +52,7 @@ def test_create_cdrom_properties_file(http_client):
response = http_client.post(
"/drive/cdrom",
data={
"vendor": "TEST_AAA",
"product": "TEST_BBB",
"revision": "1.0A",
"block_size": 2048,
"drive_name": "Sony CDU-8012",
"file_name": file_name,
},
)
@@ -77,12 +74,8 @@ def test_create_image_with_properties_file(http_client, delete_file):
response = http_client.post(
"/drive/create",
data={
"vendor": "TEST_AAA",
"product": "TEST_BBB",
"revision": "1.0A",
"block_size": 512,
"drive_name": "Miniscribe M8425",
"size": FILE_SIZE_1_MIB,
"file_type": "hds",
"file_name": file_prefix,
},
)