Grotti 3.6.0: Lauf-Identität nach Filament-Pause, robustere Queue, Projekte/Aufträge list-first und API-Polish.

This commit is contained in:
Dominic Gundel committed 2026-10-25 08:24:24 +01:00
1 parent d1eb87ba25
commit 2b1e36634a
53 files changed
+4254 -636

No files matched your search

+20 -4
View File
@@ -53,13 +53,29 @@ class MatchSpoolsTests(unittest.TestCase):
},
]
def test_base_sunlu_pla_matches_plain_pla_not_meta(self):
def test_base_sunlu_pla_matches_any_pla(self):
need = {"profile": "Sunlu PLA", "material_type": "pla", "color": "", "paint_index": 0}
matched = store._match_spools_for_need(need, self.have)
ids = {m["spool_id"] for m in matched}
self.assertEqual(ids, {3}) # Eryone PLA; Meta/Matte nicht
self.assertEqual(ids, {1, 2, 3})
def test_pla_lite_hex_matches_plain_pla(self):
def test_base_pla_matches_matte_alone(self):
need = {"profile": "Sunlu PLA", "material_type": "pla", "color": "#f2a900", "paint_index": 0}
have = [self.have[1]]
matched = store._match_spools_for_need(need, have)
self.assertEqual([m["spool_id"] for m in matched], [2])
def test_meta_falls_back_to_any_pla(self):
need = {"profile": "Sunlu PLA Meta", "material_type": "pla", "color": "", "paint_index": 0}
have = [self.have[1]]
matched = store._match_spools_for_need(need, have)
self.assertEqual([m["spool_id"] for m in matched], [2])
def test_petg_does_not_match_pla(self):
need = {"profile": "Sunlu PETG", "material_type": "petg", "color": "", "paint_index": 0}
self.assertEqual(store._match_spools_for_need(need, self.have), [])
def test_pla_lite_hex_matches_any_pla(self):
# Orca: Profil „Eryone PLA Lite“, Farbe #26A69A — Lager: Eryone/Sunlu PLA „Grau“
need = {
"profile": "Eryone PLA Lite",
@@ -86,7 +102,7 @@ class MatchSpoolsTests(unittest.TestCase):
},
]
matched = store._match_spools_for_need(need, have)
self.assertEqual({m["spool_id"] for m in matched}, {15})
self.assertEqual({m["spool_id"] for m in matched}, {15, 1})
def test_picks_meta_not_matte(self):
need = {"profile": "Sunlu PLA Meta", "material_type": "pla", "color": "", "paint_index": 0}