Code Review
/
functest-xtesting.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
7f44a27
)
Check the response status code
author
Cédric Ollivier
<cedric.ollivier@orange.com>
Wed, 17 Aug 2016 13:26:35 +0000
(15:26 +0200)
committer
Cédric Ollivier
<cedric.ollivier@orange.com>
Wed, 17 Aug 2016 13:29:07 +0000
(15:29 +0200)
Now an HTTPError exception is raised in case of a 4XX or 5XX error
response.
Change-Id: Idd91c1d2b2a1b81a1cf7d075527cb302099cdb4e
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
utils/functest_utils.py
patch
|
blob
|
history
diff --git
a/utils/functest_utils.py
b/utils/functest_utils.py
index
3dd93fd
..
862b533
100644
(file)
--- a/
utils/functest_utils.py
+++ b/
utils/functest_utils.py
@@
-219,6
+219,7
@@
def push_results_to_db(project, case_name, logger,
r = requests.post(url, data=json.dumps(params), headers=headers)
if logger:
logger.debug(r)
+ r.raise_for_status()
return True
except Exception, e:
print("Error [push_results_to_db('%s', '%s', '%s', " +