OLD | NEW |
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 unittest | 5 import unittest |
6 import update_reference_build as update_ref_build | 6 import update_reference_build as update_ref_build |
7 | 7 |
8 | 8 |
| 9 # Disable for accessing private API of update_reference_build class. |
| 10 # pylint: disable=protected-access |
9 class UpdateReferenceBuildUnittest(unittest.TestCase): | 11 class UpdateReferenceBuildUnittest(unittest.TestCase): |
10 def testInit(self): | 12 def testInit(self): |
11 @classmethod | 13 @classmethod |
12 def EmptyVersions(_): | 14 def EmptyVersions(_): |
13 return {} | 15 return {} |
14 @classmethod | 16 @classmethod |
15 def AllOmahaVersion1(_): | 17 def AllOmahaVersion1(_): |
16 return {'mac':'1', 'linux':'1', 'win':'1'} | 18 return {'mac':'1', 'linux':'1', 'win':'1'} |
17 @classmethod | 19 @classmethod |
18 def AllCurrentVersion1(_): | 20 def AllCurrentVersion1(_): |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 '03/03/15', '827a380cfdb31aa54c8d56e63ce2c3fd8c3ba4d4', | 101 '03/03/15', '827a380cfdb31aa54c8d56e63ce2c3fd8c3ba4d4', |
100 '310958', 'a4d5695040a99b9b2cb196eb5b898383a274376e', '188177', | 102 '310958', 'a4d5695040a99b9b2cb196eb5b898383a274376e', '188177', |
101 'master', '4.1.0.21\n']] | 103 'master', '4.1.0.21\n']] |
102 self.assertRaises(ValueError, b._OmahaVersionsMap) | 104 self.assertRaises(ValueError, b._OmahaVersionsMap) |
103 lines = ['random', 'list', 'of', 'strings'] | 105 lines = ['random', 'list', 'of', 'strings'] |
104 self.assertRaises(ValueError, b._OmahaVersionsMap) | 106 self.assertRaises(ValueError, b._OmahaVersionsMap) |
105 lines = [] | 107 lines = [] |
106 self.assertRaises(ValueError, b._OmahaVersionsMap) | 108 self.assertRaises(ValueError, b._OmahaVersionsMap) |
107 finally: | 109 finally: |
108 update_ref_build.BuildUpdater._OmahaReport = old_omaha_report | 110 update_ref_build.BuildUpdater._OmahaReport = old_omaha_report |
OLD | NEW |