refactor: tighten backend, flows, frontend, tests; push flows to Langflow
This commit is contained in:
parent
6688fb08c6
commit
06ab25fb47
31 changed files with 783 additions and 358 deletions
|
|
@ -2,18 +2,26 @@
|
|||
|
||||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
from app.flows import export
|
||||
|
||||
|
||||
def test_filename_stem_keeps_original_names():
|
||||
assert export.filename_stem("simple_rule") == "simple_rule"
|
||||
assert export.filename_stem("test_flow") == "test_flow"
|
||||
assert export.filename_stem("Gehaltserhöhung") == "Gehaltserhöhung"
|
||||
assert export.filename_stem("Dachsanierung 200k") == "Dachsanierung 200k"
|
||||
assert export.filename_stem(" A/B\\C ") == "A-B-C"
|
||||
assert export.filename_stem('a:b*c?d"e<f>g|h') == "a-b-c-d-e-f-g-h"
|
||||
assert export.filename_stem("trailing...") == "trailing"
|
||||
assert export.filename_stem("") == "flow"
|
||||
@pytest.mark.parametrize(
|
||||
("name", "expected"),
|
||||
[
|
||||
("simple_rule", "simple_rule"),
|
||||
("test_flow", "test_flow"),
|
||||
("Gehaltserhöhung", "Gehaltserhöhung"),
|
||||
("Dachsanierung 200k", "Dachsanierung 200k"),
|
||||
(" A/B\\C ", "A-B-C"),
|
||||
('a:b*c?d"e<f>g|h', "a-b-c-d-e-f-g-h"),
|
||||
("trailing...", "trailing"),
|
||||
("", "flow"),
|
||||
],
|
||||
)
|
||||
def test_filename_stem_keeps_original_names(name, expected):
|
||||
assert export.filename_stem(name) == expected
|
||||
|
||||
|
||||
def test_canonical_bytes_stable_under_key_reorder():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue