Skip to content

Commit

Permalink
Few changes to unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
dbr committed Sep 21, 2008
1 parent 4eb1ea1 commit 3638d64
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tvdb_api.py
Expand Up @@ -535,7 +535,7 @@ def test_numeric(self):

def test_seasonnotfound(self):
"""
Using CNNNN, as it is cancelled so it's rather unlikely
Using CNNNN, as it is cancelled so it's rather unlikely
they'll make another 8 seasons..
"""
self.assertRaises(tvdb_seasonnotfound, lambda:self.t['CNNNN'][10][1])
Expand All @@ -546,12 +546,9 @@ def test_shownotfound(self):
"""
self.assertRaises(tvdb_shownotfound, lambda:self.t['the fake show thingy'])

def test_episodenamenotfound(self):
def test_attributenamenotfound(self):
"""
Check it raises tvdb_attributenotfound if an episode name is not found.
CNNNN is a fake news program, so episodes don't have names, and the
show has been moved to "Chaser Constant News Network" so it wont
be updated ever (to have the episode name be the air-date)
"""
self.assertRaises(tvdb_attributenotfound, lambda:self.t['CNNNN'][1][6]['afakeattributething'])

Expand All @@ -564,7 +561,7 @@ def test_searchepname(self):
self.assertEquals(self.t['Scrubs'].search('my first')[0]['episodename'], 'My First Day')

def test_get_episode_overview(self):
self.assertEquals(self.t['Battlestar Galactica (2003)'][1][1]['overview'], 'The Convoy of refugees is attacked exactly thirty three minutes after every FTL jump, leading many to believe there is a traitor in their midst.')
self.assertEquals(self.t['Battlestar Galactica (2003)'][1][6]['overview'], '''When a new copy of Doral, a Cylon who had been previously exposed while serving as the Galactica's public-relations officer, sneaks aboard and blows himself up, killing three people, Commander Adama and President Roslin must finally make public the terrifying secret known only to a select few: Cylons now look like humans.''')

def test_doctest(self):
import doctest
Expand Down

0 comments on commit 3638d64

Please sign in to comment.