|
|
@@ -136,8 +136,9 @@ class TestBlockingServer(object): |
|
|
|
thread.join() |
|
|
|
|
|
|
|
def geturl(path): |
|
|
|
req = urlopen("http://127.0.0.1:32180" + path, timeout = 10) |
|
|
|
return req.read() |
|
|
|
resp = urlopen("http://127.0.0.1:32180" + path, timeout = 10) |
|
|
|
body = resp.read() |
|
|
|
return body.decode(resp.headers.get_content_charset() or 'utf-8') |
|
|
|
|
|
|
|
def getjson(path): |
|
|
|
return json.loads(geturl(path)) |
|
|
|