def test_timeout(self): url = self.get_url("/test/data/test-delayed.jpg?delay=1.0") qs = urlencode(dict(url=url, w=1, h=1)) resp = self.fetch_error(404, "/?%s" %qs) self.assertEqual(resp.get("error_code"), FetchError.get_code())
def test_not_connect(self): qs = urlencode(dict(url="http://a.com/a.jpg", w=1, h=1)) resp = self.fetch_error(404, "/?%s" % qs) self.assertEqual(resp.get("error_code"), FetchError.get_code())
def test_not_found(self): path = "/test/data/test-not-found.jpg" qs = urlencode(dict(url=self.get_url(path), w=1, h=1)) resp = self.fetch_error(404, "/?%s" % qs) self.assertEqual(resp.get("error_code"), FetchError.get_code())
def test_timeout(self): url = self.get_url("/test/data/test-delayed.jpg?delay=1.0") qs = urlencode(dict(url=url, w=1, h=1)) resp = self.fetch_error(404, "/?%s" % qs) self.assertEqual(resp.get("error_code"), FetchError.get_code())