From: asteroide Date: Thu, 21 Sep 2017 15:02:48 +0000 (+0200) Subject: Add send_authz in tests directory X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=f76342852658d387c9d231ca451822333cc52b1c;p=moon.git Add send_authz in tests directory Change-Id: I4d1a508716daf41ab5dd0b02326ca6c351b9fa26 --- 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: