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

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

Issue 10387225: Die build.py, Die: Part 1 (BranchUtility and SubversionFetcher) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Resource fetcher Created 8 years, 7 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
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 def ReadFile(filename):
6 with open(filename, 'r') as f:
7 return f.read()
8
9 def fetch(url):
10 result = MockResponse()
11 result.content = ReadFile('test_data/' + url)
12 return result
13
Aaron Boodman 2012/05/24 06:10:23 Prefix ReadFile and MockResponse with _ to make cl
cduvall 2012/05/25 20:02:23 Done.
14 class MockResponse(object):
Aaron Boodman 2012/05/24 06:10:23 Move this up above fetch()? (I'm surprised it comp
cduvall 2012/05/25 20:02:23 Done.
15 def __init__(self):
16 self.content = ''
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698