def test_set_add(self): """ Tests that creating a feature stores its key in a Redis set. """ self.feature_test.set_percentage(15) key = self.feature_test._get_redis_key() set_key = Feature._get_redis_set_key() self.assertTrue(redis.sismember(set_key, key))
def test_set_add(self): """ Tests that creating a feature stores its key in a Redis set. """ self.feature_test.set_percentage(15) key = self.feature_test._get_redis_key() set_key = Feature._get_redis_set_key() self.assertTrue(redis.sismember(set_key, key))
def test_delete(self): """ Tests that calling delete removes the data from Redis. """ self.feature_test.set_percentage(5) self.feature_test.delete() key = self.feature_test._get_redis_key() redis_data = redis.get(key) self.assertTrue(redis_data is None) set_key = Feature._get_redis_set_key() self.assertFalse(redis.sismember(set_key, key))
def test_delete(self): """ Tests that calling delete removes the data from Redis. """ self.feature_test.set_percentage(5) self.feature_test.delete() key = self.feature_test._get_redis_key() redis_data = redis.get(key) self.assertTrue(redis_data is None) set_key = Feature._get_redis_set_key() self.assertFalse(redis.sismember(set_key, key))