<commit_before>#!/usr/bin/env python
# Copyright (C) 2009-2010:
#    <NAME>, <EMAIL>
#    <NAME>, <EMAIL>
#
# This file is part of Shinken.
#
# Shinken is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Shinken is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Shinken.  If not, see <http://www.gnu.org/licenses/>.

#
# This file is used to test reading and processing of config files
#
import sys
from shinken_test import *


class TestConfigWithSymlinks(ShinkenTest):

    def setUp(self):
        self.setup_with_file('etc/nagios_conf_in_symlinks.cfg')

    def test_symlinks(self):
        
        if sys.version_info < (2 , 6):
            print "************* WARNING********"*200
            print "On python 2.4 and 2.5, the symlinks following is NOT managed"
            return
        svc = self.sched.services.find_srv_by_name_and_hostname("test_host_0", "test_HIDDEN")
        self.assert_(svc is not None)


if __name__ == '__main__':
    unittest.main()<commit_msg>Fix : test_conf_in_symlinks.py and windows is not a good mix....<commit_after>#!/usr/bin/env python
# Copyright (C) 2009-2010:
#    <NAME>, <EMAIL>
#    <NAME>, <EMAIL>
#
# This file is part of Shinken.
#
# Shinken is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Shinken is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Shinken.  If not, see <http://www.gnu.org/licenses/>.

#
# This file is used to test reading and processing of config files
#
import os
import sys
from shinken_test import *


class TestConfigWithSymlinks(ShinkenTest):

    def setUp(self):
        if os.name == 'nt':
            return
        self.setup_with_file('etc/nagios_conf_in_symlinks.cfg')

    def test_symlinks(self):
        if os.name == 'nt':
            return
        if sys.version_info < (2 , 6):
            print "************* WARNING********"*200
            print "On python 2.4 and 2.5, the symlinks following is NOT managed"
            return
        svc = self.sched.services.find_srv_by_name_and_hostname("test_host_0", "test_HIDDEN")
        self.assert_(svc is not None)


if __name__ == '__main__':
    unittest.main()
{'fraction_non_alphanumeric': 0.09868421052631579, 'fraction_numerical': 0.0125, 'mean_word_length': 3.271067415730337, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7633911', 'n_tokens_mistral': 943, 'n_tokens_neox': 906, 'n_words': 353}