<commit_before>/**
 * Created by dob on 14.04.14.
 */
var assert = require('assert'),
  url = require('../'),
  util = require('util'),
  EventEmitter = require('events').EventEmitter,
  should = require('should'),
  mlcl_database = require('mlcl_database'),
  mlcl_elastic = require('mlcl_elastic');

describe('url', function(){
  var mytestobject;
  var mlcl;
  var molecuel;
  var mongo;
  var elastic;
  var simplepattern;
  var advancedpattern;
  var filetestpattern;

  before(function (done) {
    mlcl = function() {
      return this;
    };
    util.inherits(mlcl, EventEmitter);
    molecuel = new mlcl();

    molecuel.config = { };
    molecuel.config.search = {
      host: 'localhost',
      port: '9200',
      prefix: 'mlcl-url-unit'
    };
    molecuel.config.database = {
      type: 'mongodb',
      uri: 'mongodb://localhost/mlcl-url-unit'
    };
    molecuel.config.url = {
      pattern: {
        default: '{{t title}}',
        file: '{{t file}}/{{f filename}}',
        news: 'news/{{t title}}'
      }
    };
    mongo = mlcl_database(molecuel);
    elastic = mlcl_elastic(molecuel);
    simplepattern = '{{t title}}';
    advancedpattern = 'content/{{t _id}}/{{t title}}';
    filetestpattern = 'file/{{f title}}';
    mytestobject = {
      _id: 'f8f8asdf9afsdsafa9',
      title: 'Test?! ""- Die süße Hündin läuft in die Höhle des Bären und aß ein.стейк'
    };
    done();
  });

  describe('url', function () {<commit_msg>changed hosts config for unit test<commit_after>/**
 * Created by dob on 14.04.14.
 */
var assert = require('assert'),
  url = require('../'),
  util = require('util'),
  EventEmitter = require('events').EventEmitter,
  should = require('should'),
  mlcl_database = require('mlcl_database'),
  mlcl_elastic = require('mlcl_elastic');

describe('url', function(){
  var mytestobject;
  var mlcl;
  var molecuel;
  var mongo;
  var elastic;
  var simplepattern;
  var advancedpattern;
  var filetestpattern;

  before(function (done) {
    mlcl = function() {
      return this;
    };
    util.inherits(mlcl, EventEmitter);
    molecuel = new mlcl();

    molecuel.config = { };
    molecuel.config.search = {
      hosts: ['http://localhost:9200'],
      prefix: 'mlcl-url-unit'
    };
    molecuel.config.database = {
      type: 'mongodb',
      uri: 'mongodb://localhost/mlcl-url-unit'
    };
    molecuel.config.url = {
      pattern: {
        default: '{{t title}}',
        file: '{{t file}}/{{f filename}}',
        news: 'news/{{t title}}'
      }
    };
    mongo = mlcl_database(molecuel);
    elastic = mlcl_elastic(molecuel);
    simplepattern = '{{t title}}';
    advancedpattern = 'content/{{t _id}}/{{t title}}';
    filetestpattern = 'file/{{f title}}';
    mytestobject = {
      _id: 'f8f8asdf9afsdsafa9',
      title: 'Test?! ""- Die süße Hündin läuft in die Höhle des Bären und aß ein.стейк'
    };
    done();
  });

  describe('url', function () {
{'fraction_non_alphanumeric': 0.16689466484268126, 'fraction_numerical': 0.009575923392612859, 'mean_word_length': 2.8588390501319263, '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': '1401507', 'n_tokens_mistral': 1051, 'n_tokens_neox': 1026, 'n_words': 221}