remote_output_manager_test.py (945B)
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 8 import unittest 9 10 from pylib.base import output_manager 11 from pylib.base import output_manager_test_case 12 from pylib.output import remote_output_manager 13 14 import mock # pylint: disable=import-error 15 16 17 @mock.patch('pylib.utils.google_storage_helper') 18 class 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 31 if __name__ == '__main__': 32 unittest.main()