try:
    response = requests.get('http://www.fakeurl.com')
except requests.Timeout as e:
    print('requests.Timeout exception got caught...')
print(e)
httpretty.disable()
httpretty.reset()
Mock a HTTP request that times out with HTTPretty