コード例 #1
0
ファイル: app_test.py プロジェクト: beforebeta/pilbox
 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())
コード例 #2
0
ファイル: app_test.py プロジェクト: beforebeta/pilbox
 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())
コード例 #3
0
ファイル: app_test.py プロジェクト: beforebeta/pilbox
 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())
コード例 #4
0
 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())
コード例 #5
0
 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())
コード例 #6
0
 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())