From 1b97d993573b56fff68103dbcb71d0be2925b4b8 Mon Sep 17 00:00:00 2001 From: Leandro Toledo Date: Tue, 7 Jul 2015 17:33:59 -0300 Subject: [PATCH] Adding tests --- test.py | 5 ----- tests/test_bot.py | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index d00c23f48..000000000 --- a/test.py +++ /dev/null @@ -1,5 +0,0 @@ -import unittest - -if __name__ == '__main__': - testsuite = unittest.TestLoader().discover('.') - unittest.TextTestRunner(verbosity=1).run(testsuite) diff --git a/tests/test_bot.py b/tests/test_bot.py index a0c2b1dca..966042c3c 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -5,10 +5,8 @@ import os import telegram import unittest -from token import TOKEN - -@unittest.skipIf(not TOKEN, "No tokens provided") +@unittest.skipIf(not os.environ.get('TOKEN'), "No tokens provided") class BotTest(unittest.TestCase): def setUp(self): bot = telegram.Bot(token=os.environ.get('TOKEN'))