2012-06-09 00:13:01 +00:00
|
|
|
import urllib, urllib2, unittest
|
2012-06-07 22:00:16 +00:00
|
|
|
import libpathod.test, requests
|
2011-03-05 22:21:31 +00:00
|
|
|
import tutils
|
|
|
|
|
2012-06-09 00:13:01 +00:00
|
|
|
class Sanity(tutils.ProxTest):
|
2011-03-05 22:21:31 +00:00
|
|
|
def test_http(self):
|
2012-06-07 22:00:16 +00:00
|
|
|
assert self.pathod("205").status_code == 205
|
|
|
|
assert self.log()
|
2011-03-05 22:21:31 +00:00
|
|
|
|
|
|
|
|
2012-06-09 00:13:01 +00:00
|
|
|
class TestHTTP(Sanity):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class TestHTTPS(Sanity):
|
|
|
|
ssl = True
|
|
|
|
|
|
|
|
|
|
|
|
class TestProxy(tutils.ProxTest):
|
2011-03-05 22:21:31 +00:00
|
|
|
def test_http(self):
|
2012-06-09 00:13:01 +00:00
|
|
|
f = self.pathod("205")
|
|
|
|
assert f.status_code == 205
|
2012-01-20 23:43:00 +00:00
|
|
|
|
2011-03-05 22:21:31 +00:00
|
|
|
l = self.log()
|
|
|
|
assert l[0].address
|
2011-07-14 03:59:27 +00:00
|
|
|
assert "host" in l[1].headers
|
2012-06-09 00:13:01 +00:00
|
|
|
assert l[2].code == 205
|