diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-07-19 12:13:29 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-07-19 13:28:36 +0300 |
commit | 8fc8c54d9f5973df0a1085ae357bc8bb97fba534 (patch) | |
tree | d8a297b0dd5f2520b04942a45ef559c97a6bea72 | |
parent | a301c70bebd3261ee8e872aeab2dcbc3361847c0 (diff) | |
download | ewww-8fc8c54d9f5973df0a1085ae357bc8bb97fba534.tar.gz |
test: add a bit of debug logging to http.py
-rw-r--r-- | http.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -24,7 +24,8 @@ def http_request(ctx, host=None, method=None, url=None): # Check status code of latest HTTP request. def http_status_code_is(ctx, code=None): - logging.debug(f"Verifying status code of previous HTTP request is {code}") + logging.debug(f"Verifying status code of previous HTTP request is {code}") + logging.debug(f" stderr={ctx['stderr']}") pattern = f"\n< HTTP/2 {code} " assert_eq(pattern in ctx["stderr"], True) @@ -40,6 +41,7 @@ def http_header_is(ctx, header=None, value=None): # Check a HTTP body response for latest request has a given value. def http_body_is(ctx, body=None): logging.debug(f"Verifying response body is {body!r}") + logging.debug(f" actual body={ctx['stdout']!r}") s = ctx["stdout"] body = body.encode("UTF8").decode("unicode-escape") assert_eq(body, s) |