fix: align reports with VK templates
This commit is contained in:
1 parent
c3af4c62e1
commit
c6f742f15b
5 files changed
+22
-20
No files matched your search
+1
-1
@@ -65,7 +65,7 @@ class ApiTests(unittest.TestCase):
|
||||
with sqlite3.connect(path) as connection:
|
||||
row = connection.execute("SELECT actor_id, mode, source, message FROM calculations").fetchone()
|
||||
self.assertEqual(row[:3], (700, "training", "vk"))
|
||||
self.assertIn("25", row[3])
|
||||
self.assertIn("#урок", row[3])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
+5
-4
@@ -85,16 +85,17 @@ class ReportTests(unittest.TestCase):
|
||||
)
|
||||
text = render_coaching(session, calculate_coaching(session))
|
||||
self.assertIn("#лазание", text)
|
||||
self.assertIn("Дикая Вишня [1604614], помогла Серолап [1617140] прокачать ЛУ.", text)
|
||||
self.assertIn("Дикая Вишня [1604614], помог(-ла) Серолап [1617140] прокачать ЛУ.", text)
|
||||
self.assertIn("Время: 11:00 – 11:20 [20 минут].", text)
|
||||
self.assertIn("Баллы белки: 6", text)
|
||||
self.assertIn("Баллы бельчонка: 8", text)
|
||||
self.assertIn("Баллы белки: 6 баллы.", text)
|
||||
self.assertIn("Баллы бельчонка: 8 баллы.", text)
|
||||
self.assertIn("[Скриншот Игровой с вашим персонажем", text)
|
||||
self.assertIn("истории", text)
|
||||
|
||||
def test_training_report_is_separate(self):
|
||||
text = render_training(TrainingSession("Белка", 1, "Котёнок", 2))
|
||||
self.assertIn("#урок", text)
|
||||
self.assertIn("25", text)
|
||||
self.assertIn("провел(-ла) урок", text)
|
||||
|
||||
def test_inspection_report_lists_zero_and_resources(self):
|
||||
text = render_inspection(
|
||||
|
||||
@@ -23,7 +23,7 @@ class VkConversationTests(unittest.TestCase):
|
||||
confirmation = dialog.handle(77, "самостоятельно")
|
||||
self.assertIn("подтверд", confirmation.lower())
|
||||
report = dialog.handle(77, "да")
|
||||
self.assertIn("Баллы белки: 4", report)
|
||||
self.assertIn("Баллы белки: 4 баллы.", report)
|
||||
|
||||
def test_bulk_input_is_detected_and_confirmed(self):
|
||||
dialog = BelkiDialog()
|
||||
@@ -75,7 +75,7 @@ class VkConversationTests(unittest.TestCase):
|
||||
self.assertIn("котён", dialog.handle(102, "Дикая Вишня [1604614]").lower())
|
||||
confirmation = dialog.handle(102, "Серолап [1617140]")
|
||||
self.assertIn("25", confirmation)
|
||||
self.assertIn("балл", dialog.handle(102, "да").lower())
|
||||
self.assertIn("#урок", dialog.handle(102, "да"))
|
||||
|
||||
natural = dialog.handle(103, "урок Дикая Вишня 1604614 Серолап 1617140")
|
||||
self.assertIn("25", natural)
|
||||
|
||||
Reference in new issue
Block a user