forked from catapult-project/catapult
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As well as some related format change, removing unimported. Bug: chromium:1408280 Change-Id: I6ae08c2d1244e3ed005ff0cbb0a33b2d07602363 Reviewed-on: https://chromium-review.googlesource.com/c/catapult/+/4185396 Reviewed-by: Sean McCullough <[email protected]> Commit-Queue: Funing Wang <[email protected]>
- Loading branch information
Showing
146 changed files
with
339 additions
and
1,163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,6 @@ | |
from flask import Flask | ||
import json | ||
import mock | ||
import six | ||
if six.PY2: | ||
import webapp2 | ||
import sys | ||
import uuid | ||
import webtest | ||
|
@@ -89,17 +86,8 @@ def AddHistogramsQueuePost(): | |
class AddHistogramsQueueTest(testing_common.TestCase): | ||
|
||
def setUp(self): | ||
# TODO(https://crbug.com/1262292): Change to super() after Python2 trybots retire. | ||
# pylint: disable=super-with-arguments | ||
super(AddHistogramsQueueTest, self).setUp() | ||
if six.PY2: | ||
app = webapp2.WSGIApplication([ | ||
('/add_histograms_queue', | ||
add_histograms_queue.AddHistogramsQueueHandler) | ||
]) | ||
self.testapp = webtest.TestApp(app) | ||
else: | ||
self.testapp = webtest.TestApp(flask_app) | ||
super().setUp() | ||
self.testapp = webtest.TestApp(flask_app) | ||
self.SetCurrentUser('[email protected]', is_admin=True) | ||
|
||
def testPostHistogram(self): | ||
|
@@ -633,17 +621,8 @@ def testCreateRowEntities_DoesNotAddTraceUriIfDiagnosticIsEmpty(self): | |
class AddHistogramsQueueTestWithUploadCompletionToken(testing_common.TestCase): | ||
|
||
def setUp(self): | ||
# TODO(https://crbug.com/1262292): Change to super() after Python2 trybots retire. | ||
# pylint: disable=super-with-arguments | ||
super(AddHistogramsQueueTestWithUploadCompletionToken, self).setUp() | ||
if six.PY2: | ||
app = webapp2.WSGIApplication([ | ||
('/add_histograms_queue', | ||
add_histograms_queue.AddHistogramsQueueHandler) | ||
]) | ||
self.testapp = webtest.TestApp(app) | ||
else: | ||
self.testapp = webtest.TestApp(flask_app) | ||
super().setUp() | ||
self.testapp = webtest.TestApp(flask_app) | ||
testing_common.SetIsInternalUser('[email protected]', True) | ||
self.SetCurrentUser('[email protected]') | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,6 @@ | |
import mock | ||
import random | ||
import six | ||
if six.PY2: | ||
import webapp2 | ||
import string | ||
import sys | ||
import unittest | ||
|
@@ -192,21 +190,8 @@ def UploadsInfoGet(token_id): | |
class AddHistogramsBaseTest(testing_common.TestCase): | ||
|
||
def setUp(self): | ||
# TODO(https://crbug.com/1262292): Change to super() after Python2 trybots retire. | ||
# pylint: disable=super-with-arguments | ||
super(AddHistogramsBaseTest, self).setUp() | ||
if six.PY2: | ||
app = webapp2.WSGIApplication([ | ||
('/add_histograms', add_histograms.AddHistogramsHandler), | ||
('/add_histograms/process', | ||
add_histograms.AddHistogramsProcessHandler), | ||
('/add_histograms_queue', | ||
add_histograms_queue.AddHistogramsQueueHandler), | ||
('/uploads/(.+)', uploads_info.UploadInfoHandler), | ||
]) | ||
self.testapp = webtest.TestApp(app) | ||
else: | ||
self.testapp = webtest.TestApp(flask_app) | ||
super().setUp() | ||
self.testapp = webtest.TestApp(flask_app) | ||
testing_common.SetIsInternalUser('[email protected]', True) | ||
self.SetCurrentUser('[email protected]', is_admin=True) | ||
oauth_patcher = mock.patch.object(api_auth, 'oauth') | ||
|
@@ -1645,10 +1630,7 @@ def testLogDebugInfo_NoLogUrls(self, mock_log): | |
class AddHistogramsUploadCompleteonTokenTest(AddHistogramsBaseTest): | ||
|
||
def setUp(self): | ||
# TODO(https://crbug.com/1262292): Change to super() after Python2 trybots retire. | ||
# pylint: disable=super-with-arguments | ||
super(AddHistogramsUploadCompleteonTokenTest, self).setUp() | ||
|
||
super().setUp() | ||
self._TrunOnUploadCompletionTokenExperiment() | ||
hs = _CreateHistogram( | ||
master='master', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,7 @@ | |
class GetOrCreateAncestorsTest(testing_common.TestCase): | ||
|
||
def setUp(self): | ||
# TODO(https://crbug.com/1262292): Change to super() after Python2 trybots retire. | ||
# pylint: disable=super-with-arguments | ||
super(GetOrCreateAncestorsTest, self).setUp() | ||
super().setUp() | ||
self.SetCurrentUser('[email protected]', is_admin=True) | ||
|
||
def testGetOrCreateAncestors_GetsExistingEntities(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,8 +14,6 @@ | |
|
||
import mock | ||
import six | ||
if six.PY2: | ||
import webapp2 | ||
import webtest | ||
|
||
from google.appengine.api import datastore_errors | ||
|
@@ -197,16 +195,8 @@ def AddPointQueuePost(): | |
class AddPointTest(testing_common.TestCase): | ||
|
||
def setUp(self): | ||
# TODO(https://crbug.com/1262292): Change to super() after Python2 trybots retire. | ||
# pylint: disable=super-with-arguments | ||
super(AddPointTest, self).setUp() | ||
if six.PY2: | ||
app = webapp2.WSGIApplication([('/add_point', add_point.AddPointHandler), | ||
('/add_point_queue', | ||
add_point_queue.AddPointQueueHandler)]) | ||
self.testapp = webtest.TestApp(app) | ||
else: | ||
self.testapp = webtest.TestApp(flask_app) | ||
super().setUp() | ||
self.testapp = webtest.TestApp(flask_app) | ||
units_to_direction.UpdateFromJson(_UNITS_TO_DIRECTION_DICT) | ||
self.SetCurrentUser( | ||
'[email protected]', is_admin=True) | ||
|
Oops, something went wrong.