def test_pidfile_removed_on_error(self, mock_remove_pid_file): stat.main() self.assertEqual(mock_remove_pid_file.call_count, 1)
def test_main_not_running(self, mock_execute_command): stat.main() self.assertEqual(mock_execute_command.call_count, 1)