Print request URL when package fails

This commit is contained in:
Ivan Kravets
2018-03-23 13:50:33 +02:00
parent c1c2be0b58
commit 5214b32ee3

View File

@@ -16,10 +16,10 @@ import pytest
import requests import requests
def validate_response(req): def validate_response(r):
assert req.status_code == 200 assert r.status_code == 200, r.url
assert int(req.headers['Content-Length']) > 0 assert int(r.headers['Content-Length']) > 0, r.url
assert req.headers['Content-Type'] in ("application/gzip", assert r.headers['Content-Type'] in ("application/gzip",
"application/octet-stream") "application/octet-stream")