fix: parse names and ids in bulk input
This commit is contained in:
1 parent
ba844c5e4e
commit
a2aacf4503
2 files changed
+23
-4
No files matched your search
@@ -116,6 +116,19 @@ class VkConversationTests(unittest.TestCase):
|
||||
response = dialog.handle(101, "самостоятельно")
|
||||
self.assertIn("скриншот", response.lower())
|
||||
|
||||
def test_natural_bulk_input_extracts_people_before_time_range(self):
|
||||
for text in (
|
||||
"24.08 ЛУ Дикая Вишня 1604614 Серопопик 1346767 21:00-22:00 сам",
|
||||
"24.08 ЛУ Дикая Вишня [1604614], Серопопик [1346767] 21:00-22:00 сам",
|
||||
):
|
||||
inspected = inspect_bulk_text(text)
|
||||
self.assertEqual(inspected["fields"]["escort_name"], "Дикая Вишня")
|
||||
self.assertEqual(inspected["fields"]["escort_id"], 1604614)
|
||||
self.assertEqual(inspected["fields"]["kitten_name"], "Серопопик")
|
||||
self.assertEqual(inspected["fields"]["kitten_id"], 1346767)
|
||||
self.assertEqual(inspected["fields"]["start"], "21:00")
|
||||
self.assertEqual(inspected["fields"]["end"], "22:00")
|
||||
|
||||
def test_training_supports_stepwise_and_natural_bulk(self):
|
||||
dialog = BelkiDialog()
|
||||
self.assertIn("сопровождающ", dialog.handle(102, "/урок").lower())
|
||||
|
||||
Reference in new issue
Block a user