From 45540ddd2586a3f720fdd19edf3cddd9861b1e27 Mon Sep 17 00:00:00 2001 From: shockrah Date: Tue, 11 May 2021 15:22:56 -0700 Subject: [PATCH] * Better failure logging in failed requests self.passing property is a much more comprehensive way of checking for passing tests Also this uses the colors to dump to stdout --- json-api/client-tests/request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json-api/client-tests/request.py b/json-api/client-tests/request.py index 89d34a3..91362a7 100644 --- a/json-api/client-tests/request.py +++ b/json-api/client-tests/request.py @@ -49,8 +49,8 @@ class Request: def show_response(self): - if self.response is None: - print('Response := None') + if not self.passing: + print(RED + 'Fail' + NC + ' ' + self.url) return real_code = self.response.status_code