'Facebook errors often look like 500s
After 3 attempts while facebook is down we raise a FacebookUnreachable
Exception'

def test_facebook_down(self):

    graph = self.guy.graph()
    with mock.patch('urllib2.build_opener') as patched:
        opener = mock.MagicMock()
        def side_effect(*args, **kwargs):
            response = StringIO(u'\n                                                                <title>Facebook    |    Error</title>\n                                                                Sorry,    something    went    wrong.\n                                                                ')
            http_exception = HTTPError('bla', 505, 'bla', 'bla', response)
            raise http_exception
        opener.open.side_effect = side_effect
        patched.return_value = opener
        def make_request():
            graph.get('me')
        self.assertRaises(facebook_exceptions.FacebookUnreachable, make_request)
