Chromium Code Reviews| Index: appengine/findit/waterfall/test/try_job_pipeline_test.py |
| diff --git a/appengine/findit/waterfall/test/try_job_pipeline_test.py b/appengine/findit/waterfall/test/try_job_pipeline_test.py |
| index 48586fdb4b0872f327e18f15fb334b21a2639b0a..badee8db310525e217140e1903589bf76964b62f 100644 |
| --- a/appengine/findit/waterfall/test/try_job_pipeline_test.py |
| +++ b/appengine/findit/waterfall/test/try_job_pipeline_test.py |
| @@ -4,26 +4,21 @@ |
| import json |
| -from testing_utils import testing |
| - |
| from common import buildbucket_client |
| from common.git_repository import GitRepository |
| from model import wf_analysis_status |
| +from model.test import configured_test_case |
| from model.wf_try_job import WfTryJob |
| from pipeline_wrapper import pipeline_handlers |
| -from waterfall import waterfall_config |
| from waterfall.try_job_pipeline import TryJobPipeline |
| from waterfall.try_job_type import TryJobType |
| -class TryJobPipelineTest(testing.AppengineTestCase): |
| +class TryJobPipelineTest(configured_test_case.ConfiguredTestCase): |
| app_module = pipeline_handlers._APP |
| - def _MockGetTrybotForWaterfallBuilder(self, *_): |
| - def MockedGetTrybotForWaterfallBuilder(*_): |
| - return 'linux_chromium_variable', 'master.tryserver.chromium.linux' |
| - self.mock(waterfall_config, 'GetTrybotForWaterfallBuilder', |
| - MockedGetTrybotForWaterfallBuilder) |
| + def setUp(self): |
| + super(TryJobPipelineTest, self).setUp() |
|
stgao
2016/03/30 01:06:30
Could be removed too.
lijeffrey
2016/03/30 23:28:34
Done.
|
| def _Mock_TriggerTryJobs(self, responses): |
| def MockedTriggerTryJobs(*_): |
| @@ -92,15 +87,6 @@ class TryJobPipelineTest(testing.AppengineTestCase): |
| return mock_change_logs.get(revision) |
| self.mock(GitRepository, 'GetChangeLog', MockedGetChangeLog) |
| - def _MockGetTryJobSettings(self): |
| - def _GetMockTryJobSettings(): |
| - return { |
| - 'server_query_interval_seconds': 60, |
| - 'job_timeout_hours': 5, |
| - 'allowed_response_error_times': 1 |
| - } |
| - self.mock(waterfall_config, 'GetTryJobSettings', _GetMockTryJobSettings) |
| - |
| def testSuccessfullyScheduleNewTryJobForCompile(self): |
| master_name = 'm' |
| builder_name = 'b' |
| @@ -115,11 +101,10 @@ class TryJobPipelineTest(testing.AppengineTestCase): |
| } |
| } |
| ] |
| - self._MockGetTrybotForWaterfallBuilder(master_name, builder_name) |
| + |
| self._Mock_TriggerTryJobs(responses) |
| self._Mock_GetTryJobs('1') |
| self._Mock_GetChangeLog('rev2') |
| - self._MockGetTryJobSettings() |
| WfTryJob.Create(master_name, builder_name, build_number).put() |