wyby sync: log PIN collisions as WARNING (journal error filter)
This commit is contained in:
@@ -165,3 +165,19 @@ class TestPinCollision:
|
||||
]
|
||||
sync.plan_booking(booking(), "12", date.today())
|
||||
assert len(sync.planned) == 1
|
||||
|
||||
|
||||
class TestLogRouting:
|
||||
def test_pin_collision_logged_as_warning(self, sync, capsys):
|
||||
from wyby_sync import logger
|
||||
|
||||
sync.relations = [{"parentId": "12", "childId": "55"}]
|
||||
sync.codes = [
|
||||
code_row(id=66, userId=6, code="237251", description="Bajo Temporär")
|
||||
]
|
||||
sync.plan_booking(booking(), "12", date.today())
|
||||
for s in sync.skipped:
|
||||
(logger.warning if "resolve manually" in s else logger.info)("SKIP %s", s)
|
||||
captured = capsys.readouterr()
|
||||
assert "resolve manually" in captured.err
|
||||
assert "resolve manually" not in captured.out
|
||||
|
||||
Reference in New Issue
Block a user