From 3cbd8e18cbae4bfd5596a637a45a38cbb0d16fe7 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 4 Feb 2016 18:35:38 +0000 Subject: Use symbolic constants for HTTP codes --- scripts/run_system_tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/run_system_tests.py b/scripts/run_system_tests.py index 3f7baba..343e15b 100644 --- a/scripts/run_system_tests.py +++ b/scripts/run_system_tests.py @@ -2,6 +2,7 @@ import json import os import httplib2 +from six.moves import http_client from oauth2client import client from oauth2client import service_account @@ -41,8 +42,8 @@ def _require_environ(): def _check_user_info(credentials, expected_email): http = credentials.authorize(httplib2.Http()) response, content = http.request(USER_INFO) - if response.status != 200: - raise ValueError('Expected 200 response.') + if response.status != http_client.OK: + raise ValueError('Expected 200 OK response.') content = content.decode('utf-8') payload = json.loads(content) -- cgit v1.2.3