blob: d8ddb65aec15a6b810c010fc894e7930aa28cc8f [file] [log] [blame]
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Tests for the warmup servlet."""
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import unittest
from testing import testing_helpers
from framework import sql
from framework import warmup
from services import service_manager
class WarmupTest(unittest.TestCase):
def setUp(self):
#self.cache_manager = cachemanager_svc.CacheManager()
#self.services = service_manager.Services(
# cache_manager=self.cache_manager)
self.services = service_manager.Services()
self.servlet = warmup.Warmup(
'req', 'res', services=self.services)
def testHandleRequest_NothingToDo(self):
mr = testing_helpers.MakeMonorailRequest()
actual_json_data = self.servlet.HandleRequest(mr)
self.assertEqual(
{'success': 1},
actual_json_data)