resp = get_data('http://this_address_does_not_exist.com')
self.assertEqual(resp.status_code, 200)
self.assertEqual(resp.content['twitter_handle'], '@twitter')
How to mock external servers in Python unit tests?