• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /usr/bin/env vpython3
2# Copyright 2017 The Chromium Authors
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6# pylint: disable=protected-access
7
8import unittest
9
10from pylib.base import output_manager
11from pylib.base import output_manager_test_case
12from pylib.output import remote_output_manager
13
14import mock  # pylint: disable=import-error
15
16
17@mock.patch('pylib.utils.google_storage_helper')
18class RemoteOutputManagerTest(output_manager_test_case.OutputManagerTestCase):
19
20  def setUp(self):
21    self._output_manager = remote_output_manager.RemoteOutputManager(
22        'this-is-a-fake-bucket')
23
24  def testUsableTempFile(self, google_storage_helper_mock):
25    del google_storage_helper_mock
26    self.assertUsableTempFile(
27        self._output_manager._CreateArchivedFile(
28            'test_file', 'test_subdir', output_manager.Datatype.TEXT))
29
30
31if __name__ == '__main__':
32  unittest.main()
33