blob: 44f5f708b5a44ba8553387cd4d8efc0912a68879 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001# Copyright 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed 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."""
7from __future__ import print_function
8from __future__ import division
9from __future__ import absolute_import
10
11import unittest
12
13from services import service_manager
14from testing import fake
15from testing import testing_helpers
16from tracker import issuetips
17
18
19class IssueTipsTest(unittest.TestCase):
20
21 def setUp(self):
22 self.services = service_manager.Services(
23 config=fake.ConfigService(),
24 issue=fake.IssueService(),
25 user=fake.UserService(),
26 project=fake.ProjectService())
27 self.servlet = issuetips.IssueSearchTips(
28 'req', 'res', services=self.services)
29
30 def testGatherPageData(self):
31 mr = testing_helpers.MakeMonorailRequest(path='/p/proj/issues/tips')
32 page_data = self.servlet.GatherPageData(mr)
33 self.assertEqual('issueSearchTips', page_data['issue_tab_mode'])