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

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

Issue 2605803002: [Findit] Refactoring WfTryJobData into BaseTryJobData, WfTryJobData, and FlakeTryJobData (Closed)
Patch Set: Fixing code coverage Created 3 years, 11 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
« no previous file with comments | « no previous file | appengine/findit/model/base_try_job.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/handlers/test/try_job_dashboard_test.py
diff --git a/appengine/findit/handlers/test/try_job_dashboard_test.py b/appengine/findit/handlers/test/try_job_dashboard_test.py
index 3305bfc6d7f2994faf6fce901beb61e34beef682..3f4465b141278c1f90dd6acbd0cb2eb7d1847ca0 100644
--- a/appengine/findit/handlers/test/try_job_dashboard_test.py
+++ b/appengine/findit/handlers/test/try_job_dashboard_test.py
@@ -3,12 +3,12 @@
# found in the LICENSE file.
from datetime import datetime
-from datetime import timedelta
import json
import webapp2
from handlers import try_job_dashboard
+from model.wf_try_job import WfTryJob
from model.wf_try_job_data import WfTryJobData
from testing_utils import testing
@@ -77,9 +77,7 @@ class TryJobDashboardTest(testing.AppengineTestCase):
def testGet(self):
try_job_in_progress = WfTryJobData.Create(1)
- try_job_in_progress.master_name = 'm'
- try_job_in_progress.builder_name = 'b'
- try_job_in_progress.build_number = 1
+ try_job_in_progress.try_job_key = WfTryJob.Create('m', 'b', 1).key
try_job_in_progress.try_job_type = 'compile'
try_job_in_progress.start_time = datetime(2016, 5, 4, 0, 0, 1)
try_job_in_progress.request_time = datetime(2016, 5, 4, 0, 0, 0)
@@ -88,9 +86,7 @@ class TryJobDashboardTest(testing.AppengineTestCase):
try_job_in_progress.put()
try_job_with_error = WfTryJobData.Create(2)
- try_job_with_error.master_name = 'm'
- try_job_with_error.builder_name = 'b'
- try_job_with_error.build_number = 2
+ try_job_with_error.try_job_key = WfTryJob.Create('m', 'b', 2).key
try_job_with_error.try_job_type = 'compile'
try_job_with_error.start_time = datetime(2016, 5, 4, 0, 0, 1)
try_job_with_error.request_time = datetime(2016, 5, 4, 0, 0, 0)
@@ -106,9 +102,7 @@ class TryJobDashboardTest(testing.AppengineTestCase):
try_job_with_error.put()
try_job_completed = WfTryJobData.Create(3)
- try_job_completed.master_name = 'm'
- try_job_completed.builder_name = 'b'
- try_job_completed.build_number = 3
+ try_job_completed.try_job_key = WfTryJob.Create('m', 'b', 3).key
try_job_completed.try_job_type = 'compile'
try_job_completed.start_time = datetime(2016, 5, 4, 0, 0, 1)
try_job_completed.request_time = datetime(2016, 5, 4, 0, 0, 0)
« no previous file with comments | « no previous file | appengine/findit/model/base_try_job.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698