Add required battery_size to devices, filter install panels by size

This commit is contained in:
2026-04-19 14:48:55 -05:00
parent aabe273172
commit 3e75bb3ab4
8 changed files with 238 additions and 77 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ def seeded_client(app):
id=3 BrandX 002 (BrandX, retired)
"""
with app.test_client() as c:
c.post("/device/add", data={"name": "Device A", "battery_slots": "2"})
c.post("/device/add", data={"name": "Device B", "battery_slots": "1"})
c.post("/device/add", data={"name": "Device A", "battery_slots": "2", "battery_size": "AA"})
c.post("/device/add", data={"name": "Device B", "battery_slots": "1", "battery_size": "AA"})
c.post("/battery/add", data={"brand": "BrandX", "count": "1"}) # id=1
c.post("/battery/add", data={"brand": "BrandY", "count": "1"}) # id=2
c.post("/battery/add", data={"brand": "BrandX", "count": "1"}) # id=3