Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Side by Side Diff: chrome/common/extensions/docs/server2/appengine_wrappers.py

Issue 10828042: Extensions Docs Server: Integration testing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for CQ Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 from in_memory_memcache import InMemoryMemcache
6
7 # This will attempt to import the actual Appengine modules, and if it fails,
not at google - send to devlin 2012/07/31 06:04:36 nit: (here an below), it's "App Engine" not "Appen
8 # they will be replaced with fake modules. This is useful during testing.
9 try:
10 import google.appengine.ext.webapp as webapp
11 import google.appengine.api.memcache as memcache
12 import google.appengine.api.urlfetch as urlfetch
13 except ImportError:
14 class FakeUrlFetch(object):
15 def fetch(self, url):
16 raise NotImplementedError()
17
18 def create_rpc(self):
19 raise NotImplementedError()
20
21 def make_fetch_call(self):
22 raise NotImplementedError()
23 urlfetch = FakeUrlFetch()
24
25 # Use an in-memory memcache if Appengine memcache isn't available.
26 memcache = InMemoryMemcache()
27
28 # A fake webapp.RequestHandler class for Handler to extend.
29 class webapp(object):
30 class RequestHandler(object):
31 def __init__(self, request, response):
32 self.request = request
33 self.response = response
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698