aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDanny Hermes <daniel.j.hermes@gmail.com>2016-04-07 12:10:27 -0700
committerDanny Hermes <daniel.j.hermes@gmail.com>2016-04-07 12:10:27 -0700
commit7408a645fe930a10bf559fdb346df6352ebd3d35 (patch)
tree0d6a9a52fecdbd4bfc15148648d166ac924724a8 /tests
parentef33f70abb43da50793f169ad7efdd4c72df4966 (diff)
downloadoauth2client-7408a645fe930a10bf559fdb346df6352ebd3d35.tar.gz
Replacing now() with utcnow() in device info code.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_client.py b/tests/test_client.py
index 6e0d997..9a3a04c 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -2337,8 +2337,8 @@ class TestDeviceFlowInfo(unittest2.TestCase):
with self.assertRaises(client.OAuth2DeviceCodeError):
DeviceFlowInfo.FromResponse(response)
- @mock.patch('oauth2client.client._NOW')
- def test_FromResponse_with_expires_in(self, dt_now):
+ @mock.patch('oauth2client.client._UTCNOW')
+ def test_FromResponse_with_expires_in(self, utcnow):
expires_in = 23
response = {
'device_code': self.DEVICE_CODE,
@@ -2348,7 +2348,7 @@ class TestDeviceFlowInfo(unittest2.TestCase):
}
now = datetime.datetime(1999, 1, 1, 12, 30, 27)
expire = datetime.datetime(1999, 1, 1, 12, 30, 27 + expires_in)
- dt_now.return_value = now
+ utcnow.return_value = now
result = DeviceFlowInfo.FromResponse(response)
expected_result = DeviceFlowInfo(self.DEVICE_CODE, self.USER_CODE,