@@ -0,0 +1,1140 @@
+%0A%0A%0Afrom shinken_test import *%0A%0A%0Aclass Test_CheckResult_Brok(ShinkenTest):%0A%0A    cfg_file = 'etc/shinken_1r_1h_1s.cfg'%0A%0A    expected_host_command_name = 'check-host-alive-parent'%0A    expected_svc_command_name = 'check_service'%0A%0A    def setUp(self):%0A        self.setup_with_file(self.cfg_file)%0A%0A    def test_host_check_result_brok_has_command_name(self):%0A        host = self.sched.hosts.find_by_name('test_host_0')%0A        res = %7B%7D%0A        host.fill_data_brok_from(res, 'check_result')%0A        self.assertIn('command_name', res)%0A        self.assertEqual(self.expected_host_command_name, res%5B'command_name'%5D)%0A%0A    def test_service_check_result_brok_has_command_name(self):%0A        svc = self.sched.services.find_srv_by_name_and_hostname(%0A            'test_host_0', 'test_ok_0')%0A        res = %7B%7D%0A        svc.fill_data_brok_from(res, 'check_result')%0A        self.assertIn('command_name', res)%0A        self.assertEqual(self.expected_svc_command_name, res%5B'command_name'%5D)%0A%0A%0Aclass Test_CheckResult_Brok_Host_No_command(Test_CheckResult_Brok):%0A%0A    cfg_file = 'etc/shinken_host_without_cmd.cfg'%0A%0A    expected_host_command_name = %22_internal_host_up%22%0A

test case to verify a check_result brok has the 'command_name' key