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

Side by Side Diff: appengine/findit/handlers/test/try_job_dashboard_test.py

Issue 1949763002: [Findit] Adding try job dashboard (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fixing bug where fields are missing from data Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from datetime import datetime
6 import webapp2
7
8 from handlers import try_job_dashboard
9
10 from testing_utils import testing
chanli 2016/05/03 23:58:31 After recent change, I think you clould import co
lijeffrey 2016/05/04 20:20:17 Right now it seems that's not necessary since the
11
12
13 class TryJobDashboardTest(testing.AppengineTestCase):
14 app_module = webapp2.WSGIApplication([
15 ('/try-job-dashboard', try_job_dashboard.TryJobDashboard),
16 ], debug=True)
17
18 def testRemoveMicrosecondsFromDelta(self):
19 date1 = datetime(2016, 5, 1, 1, 1, 1, 1)
20 date2 = datetime(2016, 5, 1, 1, 1, 1, 2)
21 delta = date2 - date1
22
23 self.assertEqual(
24 try_job_dashboard._RemoveMicrosecondsFromDelta(delta).microseconds,
25 0)
26
27 def testRemoveMicrosecondsFromDatetime(self):
28 date = datetime(2016, 5, 1, 0, 0, 0, 12345)
29 self.assertEqual(
30 try_job_dashboard._RemoveMicrosecondsFromDatetime(date),
31 datetime(2016, 5, 1, 0, 0, 0, 0))
32 self.assertIsNone(try_job_dashboard._RemoveMicrosecondsFromDatetime(None))
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/handlers/try_job_dashboard.py » ('j') | appengine/findit/handlers/try_job_dashboard.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698