chore: база

This commit is contained in:
protokey committed 2026-09-24 17:05:42 +04:00
1 parent 93790da617
commit 5f53cadf89
39 files changed
+1458 -19

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
from django.test import TestCase
from Telegram import interfaces
from Telegram.dispatcher import handle_update
from Telegram.models import Bot
from Telegram.tests import FakeApi, message_update
from .bot import MAIN_KEYBOARD, MyPointInterface
class MyPointInterfaceTests(TestCase):
def test_start_and_main_menu_button_are_same(self):
api = FakeApi()
bot = Bot.objects.create(token='1:test', interface=interfaces.key(MyPointInterface))
handle_update(api, bot, message_update(1, '/start'))
handle_update(api, bot, message_update(2, 'главное меню'))
self.assertEqual(api.sent[0][1], api.sent[1][1])
self.assertEqual([button['text'] for button in api.sent[0][2].keyboard[0]], MAIN_KEYBOARD[0])