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

Unified Diff: appengine/findit/handlers/test/monitor_alerts_test.py

Issue 1836293002: [Findit] Adding central config test class for unit tests (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 9 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: appengine/findit/handlers/test/monitor_alerts_test.py
diff --git a/appengine/findit/handlers/test/monitor_alerts_test.py b/appengine/findit/handlers/test/monitor_alerts_test.py
index 8b56e4e15501a11256cad231ea09aef211935bd9..c4a6fbb50c872e9e3b6b648a425fd9acd0af916a 100644
--- a/appengine/findit/handlers/test/monitor_alerts_test.py
+++ b/appengine/findit/handlers/test/monitor_alerts_test.py
@@ -6,12 +6,10 @@ import textwrap
import webapp2
-from testing_utils import testing
-
from common.http_client_appengine import RetryHttpClient
from handlers import monitor_alerts
+from model.test import configured_test_case
from waterfall import build_failure_analysis_pipelines
-from waterfall import waterfall_config
class _MockedHttpClient(RetryHttpClient):
@@ -30,7 +28,7 @@ class _MockedHttpClient(RetryHttpClient):
pass
-class MonitorAlertsTest(testing.AppengineTestCase):
+class MonitorAlertsTest(configured_test_case.ConfiguredTestCase):
app_module = webapp2.WSGIApplication([
('/monitor-alerts', monitor_alerts.MonitorAlerts),
], debug=True)
@@ -38,11 +36,6 @@ class MonitorAlertsTest(testing.AppengineTestCase):
def setUp(self):
super(MonitorAlertsTest, self).setUp()
- def MockMasterIsSupported(master_name):
- return master_name != 'm0'
-
- self.mock(waterfall_config, 'MasterIsSupported', MockMasterIsSupported)
-
def testGetLatestBuildFailuresWhenFailedToPullAlerts(self):
http_client = _MockedHttpClient(404, 'Not Found')
self.assertEqual([], monitor_alerts._GetLatestBuildFailures(http_client))

Powered by Google App Engine
This is Rietveld 408576698