<commit_before>var vumigo = require('vumigo_v02');
var AppTester = vumigo.AppTester;
var _ = require('lodash');
var fixtures = require('./fixtures');
var location = require('go-jsbox-location');
var openstreetmap = location.providers.openstreetmap;
var assert = require('assert');


describe("app", function() {
    describe("GoApp", function() {
        var app;
        var tester;
        var locations;

        beforeEach(function() {
            app = new go.app.GoApp();
            tester = new AppTester(app);
            locations = [];

            locations.push({
                query: "Quad Street",
                bounding_box: ["16.4500", "-22.1278", "32.8917", "-34.8333"],
                address_limit: 4,
                response_data: [
                    {
                        display_name:"Quad St 1, Sub 1",
                        lon: '1.1',
                        lat: '1.11',
                        address: {
                            road: "Quad St 1",
                            suburb: "Suburb number 1",
                            city: "City number 1",
                            town: "Town 1",
                            postcode: "0001",
                            country: "RSA",
                            country_code: "za"
                        }
                    },{
                        display_name:"Quad St 2, Sub 2",
                        lon: '2.2',
                        lat: '2.22',
                        address: {
                            road: "Quad St 2",
                            suburb: "Suburb number 2",
                            town: "Town number 2",
                            postcode: "0002",
                            country: "RSA",
                            country_code: "za"
                        }
                    },{
                        display_name:"Quad St 3, Sub 3",
                        lon: '3.3',
                        lat: '3.33',
                        address: {
                            road: "Quad St 3",
                            suburb: "Suburb number 3",
                            city: "City number 3",
                            postcode: "0003",
                            country: "RSA",
                            country_code: "za"
                        }
                    },{
                        display_name:"Quad St 4, Sub 4",
                        lon: '4.4',
                        lat: '4.44',
                        address: {
                            road: "Quad St 4",
                            suburb: "Suburb number 4",
                            postcode: "0004",
                            country: "RSA",
                            country_code: "za"
                        }
                    }
                ]
            });

            locations.push({
                query: "Friend Street",
                bounding_box: ["16.4500", "-22.1278", "32.8917", "-34.8333"],
                address_limit: 4,
                response_data: [
                    {
                        display_name: "Friend Street, Suburb",
                        lon: '3.1415',
                        lat: '2.7182'
                    }
                ]
            });

            tester
                .setup.config.app({
                    name: 'test_app',
                    welcome_enabled: false,
                    sms_number: '555',
                    lbs_providers: ['VODACOM', 'MTN'],
                    api_url: 'http://127.0.0.1:8000/clinicfinder/',
                    api_key: 'replace_with_token',
                    clinic_types: ['mmc', 'hct'],
                    metric_store: 'usaid_clinicfinder_test',
                    template: "Your nearest clinics are: {{ results }}. " +
                              "Thanks for using Healthsites."
                })
                .setup.char_limit(160)
                .setup(function(api) {
                    api.contacts.add({
                        msisdn: '+082111',
                        extra: {},
                    });
                })
                .setup(function(api) {
                    api.metrics.stores = {'usaid_clinicfinder_test': {}};
                })
                .setup(function(api) {
                    fixtures().forEach(api.http.fixtures.add);
                    locations.forEach(function(location) {
                        api.http.fixtures.add(openstreetmap.fixture(location));
                    });
                });
        });

        describe("when the user starts a session", function() {
            it("should increase the number of unique users metric", function() {
                return tester<commit_msg>Remove unused clinic_types from test config.<commit_after>var vumigo = require('vumigo_v02');
var AppTester = vumigo.AppTester;
var _ = require('lodash');
var fixtures = require('./fixtures');
var location = require('go-jsbox-location');
var openstreetmap = location.providers.openstreetmap;
var assert = require('assert');


describe("app", function() {
    describe("GoApp", function() {
        var app;
        var tester;
        var locations;

        beforeEach(function() {
            app = new go.app.GoApp();
            tester = new AppTester(app);
            locations = [];

            locations.push({
                query: "Quad Street",
                bounding_box: ["16.4500", "-22.1278", "32.8917", "-34.8333"],
                address_limit: 4,
                response_data: [
                    {
                        display_name:"Quad St 1, Sub 1",
                        lon: '1.1',
                        lat: '1.11',
                        address: {
                            road: "Quad St 1",
                            suburb: "Suburb number 1",
                            city: "City number 1",
                            town: "Town 1",
                            postcode: "0001",
                            country: "RSA",
                            country_code: "za"
                        }
                    },{
                        display_name:"Quad St 2, Sub 2",
                        lon: '2.2',
                        lat: '2.22',
                        address: {
                            road: "Quad St 2",
                            suburb: "Suburb number 2",
                            town: "Town number 2",
                            postcode: "0002",
                            country: "RSA",
                            country_code: "za"
                        }
                    },{
                        display_name:"Quad St 3, Sub 3",
                        lon: '3.3',
                        lat: '3.33',
                        address: {
                            road: "Quad St 3",
                            suburb: "Suburb number 3",
                            city: "City number 3",
                            postcode: "0003",
                            country: "RSA",
                            country_code: "za"
                        }
                    },{
                        display_name:"Quad St 4, Sub 4",
                        lon: '4.4',
                        lat: '4.44',
                        address: {
                            road: "Quad St 4",
                            suburb: "Suburb number 4",
                            postcode: "0004",
                            country: "RSA",
                            country_code: "za"
                        }
                    }
                ]
            });

            locations.push({
                query: "Friend Street",
                bounding_box: ["16.4500", "-22.1278", "32.8917", "-34.8333"],
                address_limit: 4,
                response_data: [
                    {
                        display_name: "Friend Street, Suburb",
                        lon: '3.1415',
                        lat: '2.7182'
                    }
                ]
            });

            tester
                .setup.config.app({
                    name: 'test_app',
                    welcome_enabled: false,
                    sms_number: '555',
                    lbs_providers: ['VODACOM', 'MTN'],
                    api_url: 'http://127.0.0.1:8000/clinicfinder/',
                    api_key: 'replace_with_token',
                    metric_store: 'usaid_clinicfinder_test',
                    template: "Your nearest clinics are: {{ results }}. " +
                              "Thanks for using Healthsites."
                })
                .setup.char_limit(160)
                .setup(function(api) {
                    api.contacts.add({
                        msisdn: '+082111',
                        extra: {},
                    });
                })
                .setup(function(api) {
                    api.metrics.stores = {'usaid_clinicfinder_test': {}};
                })
                .setup(function(api) {
                    fixtures().forEach(api.http.fixtures.add);
                    locations.forEach(function(location) {
                        api.http.fixtures.add(openstreetmap.fixture(location));
                    });
                });
        });

        describe("when the user starts a session", function() {
            it("should increase the number of unique users metric", function() {
                return tester
{'fraction_non_alphanumeric': 0.10648883243357679, 'fraction_numerical': 0.029639038848311632, 'mean_word_length': 0.8134357005758157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1254941', 'n_tokens_mistral': 2520, 'n_tokens_neox': 2169, 'n_words': 485}