Пример #1
0
 def setUp(self):
     with mock.patch("telegram.bot.Bot.setWebhook", callable=mock.MagicMock()):
         self.bot = factories.BotFactory()
     self.webhook_url = reverse('telegrambot:webhook', kwargs={'token': self.bot.token})
     self.auth_url = reverse('telegrambot:auth', kwargs={'bot': self.bot.user_api.username})
     self.update = factories.UpdateLibFactory()
     self.kwargs = {'content_type': 'application/json', }
Пример #2
0
 def setUp(self):
     self.bot = factories.BotFactory()
     self.webhook_url = reverse('telegrambot:webhook',
                                kwargs={'token': self.bot.token})
     self.auth_url = reverse('telegrambot:auth',
                             kwargs={'bot': self.bot.user_api.username})
     self.update = factories.UpdateLibFactory()
     self.kwargs = {
         'content_type': 'application/json',
     }
Пример #3
0
 def _create_bot(self, mock_getMe):
     with mock.patch("telegram.bot.Bot.setWebhook", callable=mock.MagicMock()):
         self.bot = factories.BotFactory()