Add one-time Bambu Lab catalog and refresh the UI

This commit is contained in:
Mikei386 committed 2026-11-14 14:30:32 +01:00
1 parent c41f4295a4
commit 7b56a0e3ef
11 files changed
+777 -242

No files matched your search

+13 -1
View File
@@ -19,7 +19,7 @@ class RealHTTPTests(unittest.TestCase):
self.alice.login("synthetic-one", self.password)
self.bob.login("synthetic-two", self.password)
def selection(self, quantity=1, spool="spool"):
def selection(self, quantity=1):
# IDs are discovered from actual rendered forms, not guessed from seed ordering.
html = self.alice.get("/bestand/hinzufuegen/")[1]
manufacturer = re.search(r'<option value="(\d+)"', html).group(1)
@@ -34,6 +34,18 @@ class RealHTTPTests(unittest.TestCase):
{"manufacturer": manufacturer, "product_type": product, "action": "filter"},
)[1]
color = re.search(r'<select name="color".*?<option value="(\d+)"', html, re.S).group(1)
html = self.alice.post(
"/bestand/hinzufuegen/",
{
"manufacturer": manufacturer,
"product_type": product,
"color": color,
"action": "filter",
},
)[1]
spool = re.search(r'<select name="spool_type".*?<option value="([^"]+)"', html, re.S).group(
1
)
return {
"manufacturer": manufacturer,
"product_type": product,