def test_tv_show_with_when_before_air_date(self): tv_show = TVShow() tv_show.name = u'The Walking Dead' tv_show.season_number = 4 tv_show.episode_number = 10 tv_show.air_date = datetime.strptime('2089-08-17', '%Y-%m-%d') tv_show.episode_name = u'TWD' tv_show.rating = 9 tv_show.create() queue = TorrentQueue.load_pending_queue(async=False) self.assertEquals(0, len(queue)) tv_show = TVShow.load(id=1) self.assertEquals(1, len(tv_show))
def test_tv_show_no_when(self): tv_show = TVShow() tv_show.name = u'The Walking Dead' tv_show.season_number = 4 tv_show.episode_number = 10 tv_show.air_date = datetime.strptime('1989-08-17', '%Y-%m-%d') tv_show.episode_name = u'TWD' tv_show.rating = 9 tv_show.create() queue = TorrentQueue.load() self.assertEquals(1, len(queue)) tv_show = TVShow.load(id=1) self.assertEquals(1, len(tv_show))