mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-13 11:18:20 +01:00
Adding tests
This commit is contained in:
parent
4aaab11a7b
commit
1b97d99357
2 changed files with 1 additions and 8 deletions
5
test.py
5
test.py
|
@ -1,5 +0,0 @@
|
||||||
import unittest
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
testsuite = unittest.TestLoader().discover('.')
|
|
||||||
unittest.TextTestRunner(verbosity=1).run(testsuite)
|
|
|
@ -5,10 +5,8 @@ import os
|
||||||
import telegram
|
import telegram
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from token import TOKEN
|
|
||||||
|
|
||||||
|
@unittest.skipIf(not os.environ.get('TOKEN'), "No tokens provided")
|
||||||
@unittest.skipIf(not TOKEN, "No tokens provided")
|
|
||||||
class BotTest(unittest.TestCase):
|
class BotTest(unittest.TestCase):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
bot = telegram.Bot(token=os.environ.get('TOKEN'))
|
bot = telegram.Bot(token=os.environ.get('TOKEN'))
|
||||||
|
|
Loading…
Add table
Reference in a new issue