blob: d8ddb65aec15a6b810c010fc894e7930aa28cc8f [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()
27 self.servlet = warmup.Warmup(
28 'req', 'res', services=self.services)
29
30
31 def testHandleRequest_NothingToDo(self):
32 mr = testing_helpers.MakeMonorailRequest()
33 actual_json_data = self.servlet.HandleRequest(mr)
34 self.assertEqual(
35 {'success': 1},
36 actual_json_data)