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

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

Issue 14273041: Doc server manifest page generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import unittest
7
8 from compiled_file_system_source import CompiledFileSystemSource as CFSSource
9
10 class CompiledFileSystemSourceTest(unittest.TestCase):
11 def testGet(self):
12 class MockCFS:
13 def GetFromFile(self, key):
14 fs = {
15 'key/one': 'contents-one',
16 'key/two/three': 'contents-two'
17 }
18
19 return fs.get(key)
20
21 source = CFSSource(MockCFS(), 'key', lambda key: key.lower())
22
23 self.assertEqual('contents-one', source.get('ONE'))
24 self.assertEqual('contents-two', source.get('TwO/three'))
25
26 if __name__ == '__main__':
27 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698