| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import sys | 7 import sys |
| 8 import unittest | 8 import unittest |
| 9 | 9 |
| 10 from in_memory_object_store import InMemoryObjectStore | |
| 11 from branch_utility import BranchUtility | 10 from branch_utility import BranchUtility |
| 12 from fake_url_fetcher import FakeUrlFetcher | 11 from fake_url_fetcher import FakeUrlFetcher |
| 13 from test_object_store import TestObjectStore | 12 from test_object_store import TestObjectStore |
| 14 | 13 |
| 15 class BranchUtilityTest(unittest.TestCase): | 14 class BranchUtilityTest(unittest.TestCase): |
| 16 def setUp(self): | 15 def setUp(self): |
| 17 self._branch_util = BranchUtility( | 16 self._branch_util = BranchUtility( |
| 18 os.path.join('branch_utility', 'first.json'), | 17 os.path.join('branch_utility', 'first.json'), |
| 19 FakeUrlFetcher(os.path.join(sys.path[0], 'test_data')), | 18 FakeUrlFetcher(os.path.join(sys.path[0], 'test_data')), |
| 20 object_store=TestObjectStore('test')) | 19 object_store=TestObjectStore('test')) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 50 self._branch_util.GetBranchNumberForChannelName('dev')) | 49 self._branch_util.GetBranchNumberForChannelName('dev')) |
| 51 self.assertEquals('1084', | 50 self.assertEquals('1084', |
| 52 self._branch_util.GetBranchNumberForChannelName('beta')) | 51 self._branch_util.GetBranchNumberForChannelName('beta')) |
| 53 self.assertEquals('1084', | 52 self.assertEquals('1084', |
| 54 self._branch_util.GetBranchNumberForChannelName('stable')) | 53 self._branch_util.GetBranchNumberForChannelName('stable')) |
| 55 self.assertEquals('trunk', | 54 self.assertEquals('trunk', |
| 56 self._branch_util.GetBranchNumberForChannelName('trunk')) | 55 self._branch_util.GetBranchNumberForChannelName('trunk')) |
| 57 | 56 |
| 58 if __name__ == '__main__': | 57 if __name__ == '__main__': |
| 59 unittest.main() | 58 unittest.main() |
| OLD | NEW |