Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(905)

Unified Diff: dashboard/dashboard/services/request_test.py

Issue 3019553002: [pinpoint] Gerrit patch support. (Closed)
Patch Set: Example URL Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dashboard/dashboard/services/request_test.py
diff --git a/dashboard/dashboard/services/request_test.py b/dashboard/dashboard/services/request_test.py
index cf13edeb32a431152db03d80f8177614513ef29c..b58adf297e5b3f131260eadec3346340f5789153 100644
--- a/dashboard/dashboard/services/request_test.py
+++ b/dashboard/dashboard/services/request_test.py
@@ -36,6 +36,12 @@ class SuccessTest(_RequestTest):
self._request.assert_called_once_with('https://example.com', method='GET')
self.assertEqual(response, 'response')
+ def testRequestJsonWithPrefix(self):
+ self._request.return_value = ({'status': '200'}, ')]}\'\n"response"')
+ response = request.RequestJson('https://example.com')
+ self._request.assert_called_once_with('https://example.com', method='GET')
+ self.assertEqual(response, 'response')
+
def testRequestWithBodyAndParameters(self):
self._request.return_value = ({'status': '200'}, 'response')
response = request.Request('https://example.com', 'POST', body='a string',

Powered by Google App Engine
This is Rietveld 408576698