feat(treblo): titre obligatoire, nom fichier nettoye, paroles html, script envoi (ticket nyora-2026-10-216-d)

This commit is contained in:
bolbol committed 2026-11-02 14:33:48 +01:00
1 parent a4cbda385c
commit a325cf221d
5 files changed
+689 -44

No files matched your search

+3 -3
View File
@@ -78,7 +78,7 @@ def test_approbation_usage_unique(monkeypatch, tmp_path):
monkeypatch.setattr("urllib.request.urlopen", lambda *args, **kwargs: mock_resp)
# 1er appel à generer : doit réussir et consommer l'approbation
res = generer(sphere="nyora", tags=["ambient"])
res = generer(sphere="nyora", titre="Chanson Test", tags=["ambient"])
assert res.get("task_id") == "task_unique_1"
# Vérifier que le statut est passé à USED
@@ -88,7 +88,7 @@ def test_approbation_usage_unique(monkeypatch, tmp_path):
# 2ème appel avec les mêmes paramètres : doit refuser car l'approbation est déjà consommée
with pytest.raises(ValueError) as exc:
generer(sphere="nyora", tags=["ambient"])
generer(sphere="nyora", titre="Chanson Test", tags=["ambient"])
assert "validation humaine requise" in str(exc.value)
finally:
@@ -241,7 +241,7 @@ def test_generer_sans_validation_sans_debit(monkeypatch, tmp_path):
# Aucune validation dans validations.json
with pytest.raises(ValueError) as exc:
generer(sphere="nyora", tags=["ambient", "chill"])
generer(sphere="nyora", titre="Chanson Test", tags=["ambient", "chill"])
err_msg = str(exc.value)
assert "validation humaine requise" in err_msg.lower()