I was working on a method to read some proxy information from several files today and then I wanted to test it. A very simplified version (the original has all the different files being processed in different functions on different rules and it actually has error handling) of this function is this: SYS_PROXY = '/etc/sysconfig/proxy' CURL_PROXY = '/root/.curlrc' def get_proxy(): with open(SYS_PROXY