aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNathaniel Manista <nathaniel@google.com>2016-02-04 18:35:38 +0000
committerNathaniel Manista <nathaniel@google.com>2016-02-04 18:55:30 +0000
commit3cbd8e18cbae4bfd5596a637a45a38cbb0d16fe7 (patch)
treefe5b18a140af6c1d904149690c3dda3b4e48ca58 /scripts
parent9bd85220faf18349fd4ba0d4a02a1588bcf0f1f6 (diff)
downloadoauth2client-3cbd8e18cbae4bfd5596a637a45a38cbb0d16fe7.tar.gz
Use symbolic constants for HTTP codes
Diffstat (limited to 'scripts')
-rw-r--r--scripts/run_system_tests.py5
1 files changed, 3 insertions, 2 deletions
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)