diff options
author | asteroide <thomas.duval@orange.com> | 2017-09-21 17:02:48 +0200 |
---|---|---|
committer | asteroide <thomas.duval@orange.com> | 2017-09-21 17:02:48 +0200 |
commit | f76342852658d387c9d231ca451822333cc52b1c (patch) | |
tree | bb1d9098a9d2a0a505e24c753bada9e59e6be524 | |
parent | a955f144681d4a401cf8f64ff10561cec8bc0f8b (diff) |
Add send_authz in tests directory
Change-Id: I4d1a508716daf41ab5dd0b02326ca6c351b9fa26
-rw-r--r-- | moonv4/tests/send_authz.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/moonv4/tests/send_authz.py b/moonv4/tests/send_authz.py index 305ecff6..eae4e6c2 100644 --- a/moonv4/tests/send_authz.py +++ b/moonv4/tests/send_authz.py @@ -140,12 +140,14 @@ def _send(url, stress_test=False): except requests.exceptions.ConnectionError: logger.warning("Unable to connect to server") return {} - if res and not stress_test: + if not stress_test: logger.debug(res.status_code) logger.debug(res.text) if res.status_code == 200: # logger.warning("error code 200 for {}".format(self.url)) logger.info("\033[1m{}\033[m {}".format(url, res.status_code)) + else: + logger.error("\033[1m{}\033[m {} {}".format(url, res.status_code, res.text)) try: j = res.json() except Exception as e: |