Пример #1
0
    def test_queryset_returns_currently_active_episodes(self):
        e1 = EntryFactory(publish_time=faker.past_date(), active=True)
        e2 = EntryFactory(publish_time=faker.future_date(), active=True)

        q = Entry.published.all()

        self.assertEqual(q.count(), 1)
        self.assertIn(e1, q)
Пример #2
0
 def setUp(self):
     self.e1 = EpisodeFactory(publish_time=faker.past_date())
     self.e2 = EpisodeFactory(publish_time=faker.future_date())
Пример #3
0
 def setUp(self):
     self.e1 = EntryFactory(publish_time=faker.past_date(), active=True)
     self.e2 = EntryFactory(publish_time=faker.future_date(), active=True)
Пример #4
0
 def setUp(self):
     self.h1 = HeroEntryFactory(publish_time=faker.past_date())
     self.h2 = HeroEntryFactory(publish_time=faker.future_date())