def test_ForkTask_handler(self, mock_spawnvp):
     """ Tests that the ForkTask handler can be instantiated and runs appropriately based on the input
     """
     obj = ForkTask(123, 'fork', [1, 20], None, None,
                    (get_tmp_dir_path('ForkTask')))
     obj.run()
     mock_spawnvp.assert_called_once_with(1, 'sleep', ['sleep', '20'])
Exemple #2
0
 def test_ForkTask_handler(self, mock_spawnvp):
     """ Tests that the ForkTask handler can be instantiated and runs appropriately based on the input
     """
     obj = ForkTask(123, 'fork', [1, 20], None, None, (get_tmp_dir_path('ForkTask')))
     obj.run()
     mock_spawnvp.assert_called_once_with(1, 'sleep', ['sleep', '20'])