#!/usr/bin/env python
# Copyright (C) 2009-2010:
#    Gabes Jean, naparuba@gmail.com
#    Gerhard Lausser, Gerhard.Lausser@consol.de
#
# 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()

@@ -874,16 +874,26 @@
 files%0A#%0A
+import os%0A
 import s
@@ -895,16 +895,16 @@
 ort sys%0A
-
 from shi
@@ -981,32 +981,79 @@
 ef setUp(self):%0A
+        if os.name == 'nt':%0A            return%0A
         self.set
@@ -1130,24 +1130,24 @@
 (self):%0A
-
         
 %0A       
@@ -1138,16 +1138,54 @@
         
+if os.name == 'nt':%0A            return
 %0A       

Fix : test_conf_in_symlinks.py and windows is not a good mix....