1
0

test_prompts.py 620 B

1234567891011121314151617
  1. """Tests des textes envoyés à Claude et aux membres. Lancer depuis la racine du projet : python -m unittest"""
  2. import unittest
  3. from bot.claude_client import MEMBER_MEMORY_NOTE
  4. class PromptsTest(unittest.TestCase):
  5. def test_memory_note_formats(self):
  6. # Une accolade de trop ou un champ oublié ferait planter chaque message avec MEMORY=on.
  7. note = MEMBER_MEMORY_NOTE.format(member_limit=3000, server_limit=5000, max_nicknames=5, max_nickname_length=32)
  8. self.assertNotIn("{", note)
  9. self.assertIn("ne récite jamais la fiche", note)
  10. if __name__ == "__main__":
  11. unittest.main()