def test_exit_with_code(self, mock_log, mock_exit):
        exit_with_code(1)
        mock_log.error.assert_not_called()
        mock_exit.assert_called_once_with(1)
        mock_exit.reset_mock()
        exit_with_code(0, "msg")
        mock_exit.assert_called_once_with(0)
        mock_exit.assert_called_once()