fix: format report dates for admins

This commit is contained in:
nyan404 committed 2026-08-25 13:33:44 +03:00
1 parent 9e3b50c967
commit 6074db8ea1
3 files changed
+16 -20

No files matched your search

+11 -19
View File
@@ -19,13 +19,9 @@ class VkConversationTests(unittest.TestCase):
self.assertNotIn("Для детей", HELP_TEXT)
self.assertIn("Одной строкой", HELP_TEXT)
def test_goal_dialog_rejects_non_finite_and_unbounded_values(self):
def test_calculator_starts_with_activity_choice(self):
dialog = BelkiDialog()
self.assertIn("баллов", dialog.handle(110, "/цель").lower())
self.assertIn("конечным", dialog.handle(110, "NaN").lower())
dialog.handle(110, "0")
dialog.handle(110, "10")
self.assertIn("от 1 до 1440", dialog.handle(110, "1441"))
self.assertIn("прокачку", dialog.handle(110, "/цель").lower())
def test_calculator_replaces_goal_with_points_dialog(self):
dialog = BelkiDialog()
@@ -428,22 +424,18 @@ class VkConversationTests(unittest.TestCase):
labels = [button["action"]["label"] for row in inspection.keyboard_for(505)["buttons"] for button in row]
self.assertIn("Без ресурсов", labels)
def test_goal_calculator_is_available_from_vk_menu_and_is_interactive(self):
def test_points_calculator_is_available_from_vk_menu_and_is_interactive(self):
dialog = BelkiDialog()
menu = dialog.keyboard_for(901)
labels = [button["action"]["label"] for row in menu["buttons"] for button in row]
self.assertIn("Калькулятор цели", labels)
self.assertIn("баллов", dialog.handle(901, "/цель").lower())
dialog.handle(901, "10")
dialog.handle(901, "34")
dialog.handle(901, "20")
self.assertIn("самостоятель", dialog.handle(901, "ЛУ").lower())
dialog.handle(901, "сам")
confirmation = dialog.handle(901, "1")
self.assertIn("Осталось добрать: 24", confirmation)
self.assertIn("подтвердить", confirmation.lower())
self.assertIn("Нужно заходов: 6", dialog.handle(901, "да"))
self.assertIn("Калькулятор баллов", labels)
self.assertIn("прокачку", dialog.handle(901, "/цель").lower())
dialog.handle(901, "прокачка")
dialog.handle(901, "ЛУ")
dialog.handle(901, "11:00")
dialog.handle(901, "11:20")
dialog.handle(901, "1")
self.assertIn("Куратор: 4", dialog.handle(901, "сам"))
if __name__ == "__main__":