samnesam
This commit is contained in:
1 parent
2a68a3ec1f
commit
7668618e6c
3 files changed
+45
-9
No files matched your search
@@ -26,6 +26,13 @@ class VkBotTests(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual(command["extra_kittens"], (("Второй", 3, "самостоятельно"), ("Третий", 4, "самостоятельно")))
|
||||
|
||||
def test_parse_one_line_command_with_multiple_kittens_and_shared_status(self):
|
||||
command = parse_text_command(
|
||||
"/зу 15.08 11:00 11:20 | Белка [1] | Первый [2], Второй [3] | несам"
|
||||
)
|
||||
self.assertEqual(command["kitten_independence"], "несамостоятельно")
|
||||
self.assertEqual(command["extra_kittens"], (("Второй", 3, "несамостоятельно"),))
|
||||
|
||||
def test_parse_help(self):
|
||||
self.assertEqual(parse_text_command("/help"), {"mode": "help"})
|
||||
self.assertIn("/лу", HELP_TEXT)
|
||||
|
||||
@@ -57,7 +57,7 @@ class VkConversationTests(unittest.TestCase):
|
||||
for answer in ("15.08", "11:00", "16:41", "Дикая Вишня [1604614]"):
|
||||
dialog.handle(80, answer)
|
||||
response = dialog.handle(80, "Беззубик [1 566767], Малыш [123456].")
|
||||
dialog.handle(80, "сам")
|
||||
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())
|
||||
|
||||
Reference in new issue
Block a user