Skip to content

Commit abedd08

Browse files
committed
adding basic unit tests
1 parent 43974ce commit abedd08

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import unittest, spotify_bot
2+
3+
class TestInlineQueryHandling(unittest.TestCase):
4+
def setUp(self):
5+
self.emptyQuery = ''
6+
self.nonEmptyQuery = 'Coldplay'
7+
8+
def test_empty_query(self):
9+
self.assertTrue(spotify_bot.is_empty_query(self.emptyQuery))
10+
11+
def test_nonempty_query(self):
12+
self.assertFalse(spotify_bot.is_empty_query(self.nonEmptyQuery))
13+
14+
if __name__ == '__main__':
15+
unittest.main()

0 commit comments

Comments
 (0)