mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
typo
This commit is contained in:
parent
ec644bdf90
commit
2f959f9251
@ -23,20 +23,14 @@ def test_001(req):
|
||||
t.eq(body, '{"nom": "nom"}')
|
||||
|
||||
@t.http_request("002.http")
|
||||
def http_request(req):
|
||||
def test_002(req):
|
||||
e = req.read()
|
||||
|
||||
t.eq(e['REQUEST_METHOD'], 'GET')
|
||||
t.eq(e['PATH_INFO'], "/test")
|
||||
t.eq(e['QUERY_STRING'], "")
|
||||
t.eq(sorted(p.headers), [
|
||||
("Accept", "*/*"),
|
||||
("Host", "0.0.0.0=5000"),
|
||||
("User-Agent", "curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1")
|
||||
])
|
||||
t.eq(e['HTTP_ACCEPT'], "*/*")
|
||||
t.eq(e['HTTP_HOST'], "0.0.0.0=5000")
|
||||
t.eq(e['HTTP_USER_AGENT', "curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1"])
|
||||
t.eq(e['HTTP_USER_AGENT'], "curl/7.18.0 (i486-pc-linux-gnu) libcurl/7.18.0 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.1")
|
||||
body = e['wsgi.input'].read()
|
||||
t.eq(body, '')
|
||||
|
||||
|
||||
@ -69,7 +69,7 @@ class http_request(object):
|
||||
def run():
|
||||
fsock = FakeSocket(data_source(self.fname))
|
||||
req = HttpRequest(fsock, ('127.0.0.1', 6000),
|
||||
('127.0.0.1', 8000))
|
||||
('127.0.0.1', 8000))
|
||||
func(req)
|
||||
run.func_name = func.func_name
|
||||
return run
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user