OLD | NEW |
---|---|
(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 = '' | |
OLD | NEW |