Exemplo n.º 1
0
 def test_timerfunc_list(self, mock_test_list, mock_TestManager_run):
     cpulse = utils.get_cpulse_test()
     cpulse_obj = [objects.Cpulse(self.context, **cpulse)]
     mock_test_list.return_value = cpulse_obj
     timerthread.timerfunc()
     time.sleep(1)
     self.assertTrue(mock_TestManager_run.not_called)
Exemplo n.º 2
0
 def test_timerfunc_list(self, mock_test_list, mock_TestManager_run):
     cpulse = utils.get_cpulse_test()
     cpulse_obj = [objects.Cpulse(self.context, **cpulse)]
     mock_test_list.return_value = cpulse_obj
     timerthread.timerfunc()
     time.sleep(1)
     self.assertTrue(mock_TestManager_run.not_called)
Exemplo n.º 3
0
 def test_timerfunc_list_manual_test(self, mock_test_list,
                                     mock_TestManager_run):
     cpulse = utils.get_cpulse_test()
     cpulse['testtype'] = 'manual'
     cpulse_obj = [objects.Cpulse(self.context, **cpulse)]
     mock_test_list.return_value = cpulse_obj
     timerthread.timerfunc()
     time.sleep(1)
     mock_TestManager_run.assert_called_once_with(test=cpulse_obj[0])
Exemplo n.º 4
0
 def test_timerfunc_list_manual_test(self, mock_test_list,
                                     mock_TestManager_run):
     cpulse = utils.get_cpulse_test()
     cpulse['testtype'] = 'manual'
     cpulse_obj = [objects.Cpulse(self.context, **cpulse)]
     mock_test_list.return_value = cpulse_obj
     timerthread.timerfunc()
     time.sleep(1)
     mock_TestManager_run.assert_called_once_with(test=cpulse_obj[0])
Exemplo n.º 5
0
 def test_timerfunc_no_test(self, mock_test_list):
     timerthread.timerfunc()
Exemplo n.º 6
0
 def test_timerfunc_no_test(self, mock_test_list):
     timerthread.timerfunc()