feat: show VK photos in calculation admin

This commit is contained in:
nyan404 committed 2026-08-16 15:56:17 +03:00
1 parent 6bbd8d4b0b
commit 20b434dbcd
6 files changed
+84 -5

No files matched your search

+9
View File
@@ -114,6 +114,15 @@ class VkConversationTests(unittest.TestCase):
self.assertIn("вьюнок=-1", confirmation)
self.assertIn("паук=3", confirmation)
def test_queued_photo_is_saved_in_confirmed_state(self):
dialog = BelkiDialog()
dialog.queue_attachments(107, [{"type": "photo", "url": "https://example.test/photo.jpg"}])
dialog.handle(107, "/урок")
dialog.handle(107, "Белка [1]")
confirmation = dialog.handle(107, "Котёнок [2]")
self.assertIn("подтверд", confirmation.lower())
self.assertEqual(dialog._states[107]["attachments"][0]["url"], "https://example.test/photo.jpg")
def test_natural_inspection_accepts_character_id_without_name(self):
inspected = inspect_bulk_text("осмотр дупло 6 1617140 без ресурсов")
self.assertEqual(inspected["fields"]["character_id"], 1617140)