Relecture : relance en échec, verrou, liste blanche, réponse invérifiable, étiquettes du contrat, clé hors LibreDesk, test d'instance local seulement
tests / tests (push) Failing after 1m5s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-09 08:54:44 +01:00
1 parent b48d756883
commit d65e9b49d0
6 files changed
+77 -17

No files matched your search

+6 -1
View File
@@ -3,6 +3,7 @@ Sauté sans LIBREDESK_TEST_URL."""
import json
import os
import unittest
import urllib.parse
import urllib.request
from pathlib import Path
@@ -20,8 +21,12 @@ def mailpit() -> int:
@unittest.skipUnless(os.environ.get("LIBREDESK_TEST_URL"), "instance de test non préparée")
class TestInstance(unittest.TestCase):
def test_bout_en_bout_sans_envoi(self):
url = os.environ["LIBREDESK_TEST_URL"]
if urllib.parse.urlsplit(url).hostname not in ("127.0.0.1", "localhost"): # jamais la production
self.fail(f"LIBREDESK_TEST_URL doit être l'instance locale, pas {url}")
conv = os.environ["CONVERSATION"]
cfg = Config.depuis_env({**os.environ, "DRY_RUN": "false", "ALLOWED_CONVERSATION_IDS": conv})
cfg = Config.depuis_env({**os.environ, "LIBREDESK_URL": url, "DRY_RUN": "false",
"ALLOWED_CONVERSATION_IDS": conv})
ld = LibreDesk(cfg.url, cfg.cle, cfg.secret, ecrire=True)
if not set(ld.etiquettes(conv)) <= {"tri:diagnostic"}: # déjà traitée : relancer, comme un humain
ld.etiqueter(conv, ["diag:relancer"])