def _get_mock_file(self):
    mock_file_object = Mock()
    mock_file_object.__enter__ = (lambda x: mock_file_object)
    mock_file_object.__exit__ = Mock()
    return mock_file_object
def _get_mock_file(self):
    mock_file_object = Mock()
    mock_file_object.__enter__ = (lambda x: mock_file_object)
    mock_file_object.__exit__ = Mock()
    return mock_file_object