Two or more cats fixes

This commit is contained in:
nyan404 committed 2026-08-16 22:37:22 +03:00
1 parent d58a3c7e93
commit 9be3e92a5d
2 files changed
+20 -5

No files matched your search

+11
View File
@@ -51,6 +51,17 @@ class VkConversationTests(unittest.TestCase):
self.assertEqual(dialog._states[79]["kitten_id"], 1566767)
self.assertEqual(dialog._states[79]["extra_kittens"][0][1], 123456)
def test_confirmation_numbers_kittens_and_normalizes_spaced_id(self):
dialog = BelkiDialog()
dialog.handle(80, "/лу")
for answer in ("15.08", "11:00", "16:41", "Дикая Вишня [1604614]"):
dialog.handle(80, answer)
response = dialog.handle(80, "Беззубик [1 566767], Малыш [123456].")
dialog.handle(80, "сам")
self.assertIn("Котёнок 1: Беззубик [1566767]", dialog._confirmation(dialog._states[80]))
self.assertIn("Котёнок 2: Малыш [123456]", dialog._confirmation(dialog._states[80]))
self.assertIn("самостоятель", response.lower())
def test_bulk_input_is_detected_and_confirmed(self):
dialog = BelkiDialog()
confirmation = dialog.handle(