def __get_body_from_file(self): if not util.file_exists(self.absolute_filepath): return "" file_content = util.read_file(self.absolute_filepath) sections = file_content.split(SEPARATOR) if len(sections) > 1: return sections[1] return ""
def test_directory_exists(self, mock_isfile): filepath = "/some/file/path/filename.txt" util.file_exists(filepath) mock_isfile.assert_called_once_with(filepath)