| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 os | 5 import os |
| 6 | 6 |
| 7 from testing_utils import testing | 7 from testing_utils import testing |
| 8 | 8 |
| 9 from lib import time_util | 9 from lib import time_util |
| 10 from libs.http import retry_http_client | 10 from libs.http import retry_http_client |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 """Mocks utcnow with the given value for testing.""" | 68 """Mocks utcnow with the given value for testing.""" |
| 69 self.mock(time_util, 'GetUTCNow', lambda: mocked_utcnow) | 69 self.mock(time_util, 'GetUTCNow', lambda: mocked_utcnow) |
| 70 | 70 |
| 71 def MockUTCNowWithTimezone(self, mocked_utcnow): | 71 def MockUTCNowWithTimezone(self, mocked_utcnow): |
| 72 """Mocks utcnow with the given value for testing.""" | 72 """Mocks utcnow with the given value for testing.""" |
| 73 self.mock(time_util, 'GetUTCNowWithTimezone', lambda: mocked_utcnow) | 73 self.mock(time_util, 'GetUTCNowWithTimezone', lambda: mocked_utcnow) |
| 74 | 74 |
| 75 def GetMockHttpClient(self, response_for_url=None): | 75 def GetMockHttpClient(self, response_for_url=None): |
| 76 """Return mocked http client class.""" | 76 """Return mocked http client class.""" |
| 77 return MockHttpClient(response_for_url) | 77 return MockHttpClient(response_for_url) |
| OLD | NEW |