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

Side by Side Diff: packages/infra_libs/infra_libs/time_functions/test/testing_test.py

Issue 2179853002: Added packages/infra_libs as the first Python package. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Final rebase (no actual changes) Created 4 years, 4 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
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import datetime 5 import datetime
6 import mock 6 import mock
7 import pytz 7 import pytz
8 import unittest 8 import unittest
9 9
10 from infra_libs.time_functions.testing import mock_datetime_utc, mock_timezone 10 from infra_libs.time_functions.testing import mock_datetime_utc, mock_timezone
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 @mock_timezone('US/Pacific') 70 @mock_timezone('US/Pacific')
71 def test_winter_time_is_computed_correctly(self): 71 def test_winter_time_is_computed_correctly(self):
72 self.assertEqual(datetime.datetime.now(), 72 self.assertEqual(datetime.datetime.now(),
73 datetime.datetime(2015, 11, 24, 1, 10, 15)) 73 datetime.datetime(2015, 11, 24, 1, 10, 15))
74 74
75 @mock_datetime_utc(2015, 8, 24, 9, 10, 15) 75 @mock_datetime_utc(2015, 8, 24, 9, 10, 15)
76 @mock_timezone('US/Pacific') 76 @mock_timezone('US/Pacific')
77 def test_summer_time_is_computed_correctly(self): 77 def test_summer_time_is_computed_correctly(self):
78 self.assertEqual(datetime.datetime.now(), 78 self.assertEqual(datetime.datetime.now(),
79 datetime.datetime(2015, 8, 24, 2, 10, 15)) 79 datetime.datetime(2015, 8, 24, 2, 10, 15))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698