blob: 9734b928e4280ca560ffbe4e79a974f4fb119ac8 [file] [log] [blame]
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +01001# Copyright 2016 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
Copybara854996b2021-09-07 19:36:02 +00004
5"""Tests for issuetips module."""
6from __future__ import print_function
7from __future__ import division
8from __future__ import absolute_import
9
10import unittest
11
12from services import service_manager
13from testing import fake
14from testing import testing_helpers
15from tracker import issuetips
16
17
18class IssueTipsTest(unittest.TestCase):
19
20 def setUp(self):
21 self.services = service_manager.Services(
22 config=fake.ConfigService(),
23 issue=fake.IssueService(),
24 user=fake.UserService(),
25 project=fake.ProjectService())
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +010026 self.servlet = issuetips.IssueSearchTips(services=self.services)
Copybara854996b2021-09-07 19:36:02 +000027
28 def testGatherPageData(self):
29 mr = testing_helpers.MakeMonorailRequest(path='/p/proj/issues/tips')
30 page_data = self.servlet.GatherPageData(mr)
31 self.assertEqual('issueSearchTips', page_data['issue_tab_mode'])