def setUp(self): one_day = timedelta(days=1) today = datetime.now() - timedelta(seconds=1) yesterday = today - one_day tomorrow = today + one_day series = WebComicSeries(name="Chaos Crystal", series_slug="chaoscrystal", start_date=yesterday) series.save() wc_image = WebComicImage(page_number=1, release_date=yesterday, series=series) wc_image.save() wc_image = WebComicImage(page_number=2, release_date=today, series=series) wc_image.save() wc_image = WebComicImage(page_number=3, release_date=tomorrow, series=series) wc_image.save()
def setUp(self): one_day = timedelta(days=1) today = datetime.now() - timedelta(seconds=1) yesterday = today - one_day tomorrow = today + one_day series = WebComicSeries(name="Chaos Crystal", series_slug="chaoscrystal", start_date=yesterday) series.save() series = WebComicSeries(name="Ultimate Coffee", series_slug="ultimatecoffee", start_date=today) series.save() series = WebComicSeries(name="Future Comic", series_slug="futurecomic", start_date=tomorrow) series.save()