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

Unified Diff: dashboard/dashboard/api/bugs_test.py

Issue 2978933002: Add alert timestamps, bisect start, and convert bug timestamps to ISO format. (Closed)
Patch Set: Fix started_timestamp name Created 3 years, 5 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 | « dashboard/dashboard/api/bugs.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/api/bugs_test.py
diff --git a/dashboard/dashboard/api/bugs_test.py b/dashboard/dashboard/api/bugs_test.py
index d5e59108facebeb588da904cb4725fa0e5a544a1..13fdfbdfc00844daf8eb31ceb64e40cb19601891 100644
--- a/dashboard/dashboard/api/bugs_test.py
+++ b/dashboard/dashboard/api/bugs_test.py
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import datetime
import mock
import unittest
@@ -110,15 +111,18 @@ class BugsTest(testing_common.TestCase):
try_job.TryJob(
bug_id=123456, status='started', bot='win_perf',
- results_data={}, config='config = {"command": "cmd"}').put()
+ results_data={}, config='config = {"command": "cmd"}',
+ last_ran_timestamp=datetime.datetime(2017, 01, 01)).put()
try_job.TryJob(
bug_id=123456, status='failed', bot='android_bisect',
results_data={'metric': 'foo'},
- config='config = {"command": "cmd"}').put()
+ config='config = {"command": "cmd"}',
+ last_ran_timestamp=datetime.datetime(2017, 01, 01)).put()
try_job.TryJob(
bug_id=99999, status='failed', bot='win_perf',
results_data={'metric': 'foo'},
- config='config = {"command": "cmd"}').put()
+ config='config = {"command": "cmd"}',
+ last_ran_timestamp=datetime.datetime(2017, 01, 01)).put()
response = self.testapp.post('/api/bugs/123456')
bug = self.GetJsonValue(response, 'bug')
self.assertEqual('The bug title', bug.get('summary'))
@@ -134,6 +138,8 @@ class BugsTest(testing_common.TestCase):
self.assertEqual(2, len(bug.get('legacy_bisects')))
self.assertEqual('started', bug.get('legacy_bisects')[0].get('status'))
self.assertEqual('cmd', bug.get('legacy_bisects')[0].get('command'))
+ self.assertEqual('2017-01-01T00:00:00', bug.get('legacy_bisects')[0].get(
+ 'started_timestamp'))
@mock.patch.object(utils, 'ServiceAccountHttp', mock.MagicMock())
@mock.patch.object(utils, 'IsGroupMember')
« no previous file with comments | « dashboard/dashboard/api/bugs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698