class BaseRedisTestCase(RedisTestCase): def onRedisUp(self): self.cid = 'non-existent-container' self.redis = RedisAPI() self.s = DummyRedisSensor({'cid': self.cid}) self.s.start() def onRedisDown(self): self.s.kill() def test_values(self): expected = next(self.s.get_data()) real = self.redis.get(self.s.uid) self.assertEqual(expected, real)
def onRedisUp(self): self.cid = 'non-existent-container' self.redis = RedisAPI() self.s = DummyRedisSensor({'cid': self.cid}) self.s.start()