mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
e78b48ab20
RIP pry.
32 lines
609 B
Python
32 lines
609 B
Python
import urllib, urllib2
|
|
import libpathod.test, requests
|
|
import tutils
|
|
|
|
class uSanity(tutils.ProxTest):
|
|
def test_http(self):
|
|
assert self.pathod("205").status_code == 205
|
|
assert self.log()
|
|
|
|
|
|
class uProxy(tutils.ProxTest):
|
|
def test_http(self):
|
|
f = self._get()
|
|
assert f.code == 200
|
|
assert f.read()
|
|
f.close()
|
|
|
|
l = self.log()
|
|
assert l[0].address
|
|
assert "host" in l[1].headers
|
|
assert l[2].code == 200
|
|
|
|
|
|
tests = [
|
|
tutils.TestServer(), [
|
|
uSanity(),
|
|
],
|
|
tutils.TestServer(ssl=True), [
|
|
uSanity(),
|
|
],
|
|
]
|