Add test for unstripped tokens [ci skip]

This commit is contained in:
Leandro Toledo 2016-05-22 18:21:51 -03:00
parent b987c8937c
commit af89cbecf3

View file

@ -192,6 +192,9 @@ class BotTest(BaseTest, unittest.TestCase):
def testInvalidToken3(self):
self._test_invalid_token('12:')
def testInvalidToken4(self):
self._test_invalid_token('1234:abcd1234\n')
def testUnauthToken(self):
with self.assertRaisesRegexp(telegram.error.Unauthorized, 'Unauthorized'):
bot = telegram.Bot('1234:abcd1234')