@@ -0,0 +1,2265 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A# Copyright (c) 2015-2016:%0A#   Matthieu Estrada, ttamalfor@gmail.com%0A#%0A# This file is part of (AlignakApp).%0A#%0A# (AlignakApp) is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU Affero General Public License as published by%0A# the Free Software Foundation, either version 3 of the License, or%0A# (at your option) any later version.%0A#%0A# (AlignakApp) is distributed in the hope that it will be useful,%0A# but WITHOUT ANY WARRANTY; without even the implied warranty of%0A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A# GNU Affero General Public License for more details.%0A#%0A# You should have received a copy of the GNU Affero General Public License%0A# along with (AlignakApp).  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A%0Aimport sys%0A%0Aimport unittest2%0A%0Afrom alignak_app.core.utils import init_config%0Afrom alignak_app.core.backend import AppBackend%0Afrom alignak_app.synthesis.synthesis import Synthesis%0A%0Atry:%0A    __import__('PyQt5')%0A    from PyQt5.QtWidgets import QApplication, QPushButton%0A    from PyQt5.QtWidgets import QWidget, QLabel%0Aexcept ImportError:%0A    from PyQt4.Qt import QApplication, QPushButton%0A    from PyQt4.Qt import QWidget, QLabel%0A%0A%0Aclass TestServicesView(unittest2.TestCase):%0A    %22%22%22%0A        This file test the Synthesis class.%0A    %22%22%22%0A%0A    init_config()%0A%0A    app_backend = AppBackend()%0A    app_backend.login()%0A%0A    @classmethod%0A    def setUpClass(cls):%0A        %22%22%22Create QApplication%22%22%22%0A        try:%0A            cls.app = QApplication(sys.argv)%0A            cls.widget = QWidget()%0A        except:%0A            pass%0A%0A    def test_initialize(self):%0A        %22%22%22Initialize Synthesis%22%22%22%0A%0A        under_test = Synthesis()%0A%0A        self.assertFalse(under_test.app_backend)%0A        self.assertFalse(under_test.action_manager)%0A        self.assertFalse(under_test.host_view)%0A        self.assertFalse(under_test.services_view)%0A        self.assertTrue(under_test.line_search)%0A%0A        under_test.initialize(self.app_backend)%0A%0A        self.assertTrue(under_test.app_backend)%0A        self.assertTrue(under_test.action_manager)%0A        self.assertTrue(under_test.host_view)%0A        self.assertTrue(under_test.services_view)%0A        self.assertTrue(under_test.line_search)

Add Unit Tests for Synthesis