def METHOD_NAME(self, test_data):
    test_data = textwrap.dedent(test_data)
    mode = 'w'
    if sys.platform != 'cygwin':
        mode += 't'
    with open(temp_filename, mode) as fp:
        fp.write(test_data)
    return netrc.netrc(temp_filename)