OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is govered by a BSD-style |
| 3 # license that can be found in the LICENSE file or at |
| 4 # https://developers.google.com/open-source/licenses/bsd |
| 5 |
| 6 """Tests for issuetips module.""" |
| 7 |
| 8 import unittest |
| 9 |
| 10 from services import service_manager |
| 11 from testing import fake |
| 12 from testing import testing_helpers |
| 13 from tracker import issuetips |
| 14 |
| 15 |
| 16 class IssueTipsTest(unittest.TestCase): |
| 17 |
| 18 def setUp(self): |
| 19 self.services = service_manager.Services( |
| 20 config=fake.ConfigService(), |
| 21 issue=fake.IssueService(), |
| 22 user=fake.UserService(), |
| 23 project=fake.ProjectService()) |
| 24 self.servlet = issuetips.IssueSearchTips( |
| 25 'req', 'res', services=self.services) |
| 26 |
| 27 def testGatherPageData(self): |
| 28 mr = testing_helpers.MakeMonorailRequest(path='/p/proj/issues/tips') |
| 29 page_data = self.servlet.GatherPageData(mr) |
| 30 self.assertEqual('issueSearchTips', page_data['issue_tab_mode']) |
| 31 |
| 32 |
| 33 if __name__ == '__main__': |
| 34 unittest.main() |
OLD | NEW |