blob: 8140fc7ffdd39e124400cd60fc413f92df5b4acb [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001# Copyright 2017 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 the warmup servlet."""
7from __future__ import print_function
8from __future__ import division
9from __future__ import absolute_import
10
11import unittest
12
13from testing import testing_helpers
14
15from framework import sql
16from framework import warmup
17from services import service_manager
18
19
20class WarmupTest(unittest.TestCase):
21
22 def setUp(self):
23 #self.cache_manager = cachemanager_svc.CacheManager()
24 #self.services = service_manager.Services(
25 # cache_manager=self.cache_manager)
26 self.services = service_manager.Services()
Adrià Vilanova Martínezde942802022-07-15 14:06:55 +020027 self.servlet = warmup.Warmup('req', 'res', services=self.services)
Copybara854996b2021-09-07 19:36:02 +000028
29
30 def testHandleRequest_NothingToDo(self):
31 mr = testing_helpers.MakeMonorailRequest()
32 actual_json_data = self.servlet.HandleRequest(mr)
33 self.assertEqual(
34 {'success': 1},
35 actual_json_data)