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

Side by Side Diff: appengine/chromium_try_flakes/endpoints_client/test/endpoints_test.py

Issue 2438673004: [Findit] Post analysis results of flakes to bug filed by chromium-try-flakes. (Closed)
Patch Set: Add a config flag to enable/disable updating monorail bug. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import mock 5 import mock
6 import unittest 6 import unittest
7 7
8 from apiclient.errors import HttpError 8 from apiclient.errors import HttpError
9 from endpoints import endpoints 9 from endpoints_client import endpoints
10 10
11 11
12 class EndpointsTestCase(unittest.TestCase): 12 class EndpointsTestCase(unittest.TestCase):
13 def setUp(self): 13 def setUp(self):
14 super(EndpointsTestCase, self).setUp() 14 super(EndpointsTestCase, self).setUp()
15 self.build = mock.Mock() 15 self.build = mock.Mock()
16 self.cred = mock.Mock() 16 self.cred = mock.Mock()
17 self.http = mock.Mock() 17 self.http = mock.Mock()
18 self.sleep = mock.Mock() 18 self.sleep = mock.Mock()
19 self.patchers = [ 19 self.patchers = [
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 endpoints.retry_request(request, num_tries=3) 68 endpoints.retry_request(request, num_tries=3)
69 69
70 def test_fails_requests_with_unsupported_retry_errors(self): 70 def test_fails_requests_with_unsupported_retry_errors(self):
71 request = mock.Mock() 71 request = mock.Mock()
72 request.execute.side_effect = [ 72 request.execute.side_effect = [
73 HttpError(mock.Mock(status=400), 'err'), 73 HttpError(mock.Mock(status=400), 'err'),
74 'response' 74 'response'
75 ] 75 ]
76 with self.assertRaises(HttpError): 76 with self.assertRaises(HttpError):
77 endpoints.retry_request(request) 77 endpoints.retry_request(request)
OLDNEW
« no previous file with comments | « appengine/chromium_try_flakes/endpoints_client/test/__init__.py ('k') | appengine/chromium_try_flakes/findit/findit.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698