feat(training): drop info heading and show last training time

This commit is contained in:
admin committed 2026-10-29 20:20:32 +02:00
1 parent 60f41dd675
commit 2fd41d82b9
4 files changed
+46 -12

No files matched your search

+6 -3
View File
@@ -1184,12 +1184,15 @@ class TrainingSummaryTests(unittest.IsolatedAsyncioTestCase):
def test_rich_html_contains_only_filled_blocks(self) -> None:
rendered = bot.training_info_rich_html(
{"about": "Канал про ИИ", "topics": "", "style": "сухо", "audience": ""}
{"about": "Канал про ИИ", "topics": "", "style": "сухо", "audience": ""},
"2026-10-29 18:11:35",
)
self.assertIn("<h2>", rendered)
self.assertNotIn("<h2>", rendered)
self.assertTrue(rendered.startswith("<h3>"))
self.assertIn("Канал про ИИ", rendered)
self.assertNotIn("Основные темы", rendered)
self.assertEqual(bot.training_info_rich_html({}), "")
self.assertIn("Последнее обучение: 29.10.2026, 20:11", rendered)
self.assertEqual(bot.training_info_rich_html({}, ""), "")
async def test_summary_is_saved_after_profile_rebuild(self) -> None:
with patch.object(bot, "create_tone_profile", new=AsyncMock(return_value="профиль")), \