def test_create(self): self.assertEqual(redis.scard('stories'), 0) self.create_story() self.assertEqual(redis.scard('stories'), 1)
def test_stories(self): self.assertEqual(redis.scard('stories'), 0) fetch_stories() self.assertEqual(redis.scard('stories'), 1)
def test_stories_unscheduled(self): self.assertEqual(redis.scard('stories:unscheduled'), 0) fetch_stories() self.assertEqual(redis.scard('stories:unscheduled'), 1)
def count_icebox(cls): return redis.scard( cls.STATE_KEY.format( state='unscheduled' ) )