<commit_before>var mockery = require('mockery');
var assert = require('assert');
var restify = require('restify');

var httpclient = restify.createJsonClient({
  version: '*',
  url: 'http://127.0.0.1:8080'
});

var mockConfig = {
  getConf: function(){
    return {
      httpport: 8080,
      outboundproxy: '127.0.0.1:5080',
      domain: 'cabletownlabs',
      localHost: '127.0.0.1:5060',
      org: 'cabletownlabs'
    }
  }
}
function JSEPGatewayMock()
{
    this.AddJSEPSession = function(options){
      return '8e183130-81b5-11e2-8507-c93c53794ef2';
    },
    this.listeners = function(uuid){
      return [];
    },
    this.on = function(){
    }
    this.AddJSEPMessage = function(options){
      return;
    },
    this.EndJSEPSession = function(option){
      return;
    }
}

describe('Test Rest Interface', function(){
  before(function(done){
    mockery.enable();
    mockery.registerMock('../lib/jsep-to-sip', JSEPGatewayMock);
    mockery.registerMock('../config/conftool', mockConfig);
    mockery.warnOnReplace(false);
    mockery.warnOnUnregistered(false);
    require('../server.js');<commit_msg>fix test mock<commit_after>var mockery = require('mockery');
var assert = require('assert');
var restify = require('restify');

var httpclient = restify.createJsonClient({
  version: '*',
  url: 'http://127.0.0.1:8080'
});

var mockConfig = {
  getConf: function(){
    return {
      httpport: 8080,
      outboundproxy: '127.0.0.1:5080',
      domain: 'cabletownlabs',
      localHost: '127.0.0.1:5060',
      org: 'cabletownlabs'
    }
  }
}
function JSEPGatewayMock()
{
    this.AddJSEPSession = function(options){
      return '8e183130-81b5-11e2-8507-c93c53794ef2';
    },
    this.listeners = function(uuid){
      return [];
    },
    this.on = function(){
    }
    this.AddJSEPMessage = function(options){
      return;
    },
    this.EndJSEPSession = function(option){
      return;
    }
}

describe('Test Rest Interface', function(){
  before(function(done){
    mockery.enable();
    mockery.registerMock('../lib/jsep-to-sip', JSEPGatewayMock);
    mockery.registerMock('../config/conftool', mockConfig);
    mockery.registerMock('./config/conftool', mockConfig);
    mockery.warnOnReplace(false);
    mockery.warnOnUnregistered(false);
    require('../server.js');
{'fraction_non_alphanumeric': 0.16326530612244897, 'fraction_numerical': 0.05123751628310899, 'mean_word_length': 3.274582560296846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '882090', 'n_tokens_mistral': 869, 'n_tokens_neox': 809, 'n_words': 123}