<commit_before>
var CallbackHandler = require('../venacava.js').CallbackHandler
, redis = require('redis')
, assert = require('assert')
;

var redisClient = function () {
    return redis.createClient();
};

describe('call back handler', function () {

    var cbHandler
    , otherHandler
    ;

    before(function(done) {
	cbHandler = new CallbackHandler('90210', redisClient(), redisClient());
	otherHandler = new CallbackHandler('90211', redisClient(), redisClient());
	return done();
    });

    it('should return a handler for a callback', function (done) {
	assert(cbHandler.handleCallback(function () {}));
	return done();<commit_msg>Rewrite callback handler test to take advantage of venacava.redisClient.<commit_after>
var venacava = require('../venacava')
, redisClient = venacava.redisClient
, CallbackHandler = require('../venacava.js').CallbackHandler
, assert = require('assert')
;

describe('call back handler', function () {

    var cbHandler
    , otherHandler
    ;

    before(function(done) {
	cbHandler = new CallbackHandler('90210', redisClient.create(), redisClient.create());
	otherHandler = new CallbackHandler('90211', redisClient.create(), redisClient.create());
	return done();
    });

    it('should return a handler for a callback', function (done) {
	assert(cbHandler.handleCallback(function () {}));
	return done();
{'fraction_non_alphanumeric': 0.14792899408284024, 'fraction_numerical': 0.014792899408284023, 'mean_word_length': 4.934210526315789, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6860585', 'n_tokens_mistral': 410, 'n_tokens_neox': 389, 'n_words': 94}