Grotti 3.7.0: Treiber für Kobra 4 und Marlin, smartere Dateien-Auswahl und einstellbare Etiketten.
Senden und Abbruch laufen über den Treiber, Orca-Doppelzeilen und tote Ideen-API fallen weg, Drucker folgen der Datei, Etikettenformat liegt in den Einstellungen.
This commit is contained in:
1 parent
5081212212
commit
db6a85a703
54 files changed
+3379
-384
No files matched your search
@@ -155,12 +155,31 @@ class OrcaSendenHelpersTest(unittest.TestCase):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
path = Path(tmp) / "orca-senden.json"
|
||||
path.write_text(
|
||||
json.dumps({"url": "http://127.0.0.1:8770/", "token": "grt_abc"}),
|
||||
json.dumps({
|
||||
"url": "http://127.0.0.1:8770/",
|
||||
"token": "grt_abc",
|
||||
"watch_dir_local": "D:/Slice",
|
||||
}),
|
||||
encoding="utf-8",
|
||||
)
|
||||
cfg = orca.load_config(path)
|
||||
self.assertEqual(cfg["url"], "http://127.0.0.1:8770")
|
||||
self.assertEqual(cfg["token"], "grt_abc")
|
||||
self.assertEqual(cfg["watch_dir_local"], "D:/Slice")
|
||||
|
||||
def test_resolve_watch_dir_prefers_local(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
local = Path(tmp) / "slice"
|
||||
local.mkdir()
|
||||
cfg = {
|
||||
"url": "http://127.0.0.1:8770",
|
||||
"token": "grt_x",
|
||||
"watch_dir_local": str(local),
|
||||
}
|
||||
with patch.object(orca, "fetch_watch_dir") as fetch:
|
||||
resolved = orca.resolve_watch_dir(cfg)
|
||||
self.assertEqual(resolved, local)
|
||||
fetch.assert_not_called()
|
||||
|
||||
def test_load_config_missing(self):
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
|
||||
Reference in new issue
Block a user