Ejemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     unittest.TestCase.__init__(self, *args, **kwargs)
     self.api = TelegramAPy(TELEGRAM_TOKEN)
Ejemplo n.º 2
0
 def test_invalid_token(self):
     """Does raise exception with invalid token?"""
     with self.assertRaises(InvalidTokenException):
         TelegramAPy("wrongtoken")
Ejemplo n.º 3
0
 def test_wrong_token(self):
     """Does raise exception with invalid token?"""
     w_api = TelegramAPy("123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11")
     with self.assertRaises(TelegramException):
         w_api.getMe()
Ejemplo n.º 4
0
 def __init__(self, *args, **kwargs):
     super(GeneralTests, self).__init__(*args, **kwargs)
     self.api = TelegramAPy(TELEGRAM_TOKEN)