OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 from branch_utility import BranchUtility | 5 from branch_utility import BranchUtility, ChannelInfo |
6 | 6 |
7 class TestBranchUtility(object): | 7 class TestBranchUtility(object): |
8 '''Mimics BranchUtility to return valid-ish data without needing omahaproxy | 8 '''Mimics BranchUtility to return valid-ish data without needing omahaproxy |
9 data. | 9 data. |
10 ''' | 10 ''' |
11 def GetBranchForChannel(self, channel_name): | 11 def GetAllChannelInfo(self): |
12 return channel_name | 12 return [self.GetChannelInfo(channel) |
| 13 for channel in BranchUtility.GetAllChannelNames()] |
| 14 |
| 15 def GetChannelInfo(self, channel): |
| 16 return ChannelInfo(channel, |
| 17 'fakebranch-%s' % channel, |
| 18 'fakeversion-%s' % channel) |
| 19 |
| 20 def GetBranchForVersion(self, version): |
| 21 return 'fakebranch-%s' % version |
OLD | NEW |