Add python tests

This commit is contained in:
Christine Dodrill 2015-08-12 18:16:33 -07:00
parent 833adfcd85
commit b8ded4cdcd
1 changed files with 27 additions and 0 deletions

27
client/python/test.py Normal file
View File

@ -0,0 +1,27 @@
import ponyapi
import unittest
class TestPonyAPI(unittest.TestCase):
def test_newest(self):
ponyapi.newest()
def test_all_episodes(self):
assert len(ponyapi.all_episodes()) > 0
def test_last_aired(self):
ponyapi.last_aired()
def test_random(self):
ponyapi.random()
def test_get_season(self):
assert len(ponyapi.get_season(4)) > 0
def test_get_episode(self):
ponyapi.get_episode(2, 14)
def test_searcn(self):
assert len(ponyapi.search("pony")) > 0
if __name__ == '__main__':
unittest.main()