move unit test for obtain_file to fetch.py and fix it