def test_passing_in_a_season_number_renames_a_file_using_that_season_number(self): fn = 'chuck.s1e08.blah.HDTV.XViD.avi' episode = Episode(self.tv.extract_details_from_file(fn)) episode.season = 2 episode.title = self.tv.retrieve_episode_name(episode) episode.show_name = self.tv.format_show_name(episode.show_name) path = self.tv.build_path(episode, organise=False) self.tv.rename(fn, path) assert_true(isfile(join(self.files, 'Chuck - 208 - Chuck Versus the Gravitron.avi')))
def test_passing_in_a_season_number_to_retrieve_episode_name_returns_the_correct_episode_name_from_that_season(self): episode = Episode(self.tv.extract_details_from_file('chuck.s1e08.avi')) episode.season = 2 assert_equal(self.tv.retrieve_episode_name(episode), 'Chuck Versus the Gravitron')