Index: chrome/common/extensions/docs/server2/intro_data_source_test.py |
diff --git a/chrome/common/extensions/docs/server2/intro_data_source_test.py b/chrome/common/extensions/docs/server2/intro_data_source_test.py |
index 90f2c76de4c146147104d2176c17b6d2c475e42b..45f5c242d45551ac62324be661e1abc4442611e5 100755 |
--- a/chrome/common/extensions/docs/server2/intro_data_source_test.py |
+++ b/chrome/common/extensions/docs/server2/intro_data_source_test.py |
@@ -4,13 +4,26 @@ |
# found in the LICENSE file. |
from server_instance import ServerInstance |
-import svn_constants |
from test_file_system import TestFileSystem |
import unittest |
-_TEST_DATA = TestFileSystem.MoveTo(svn_constants.INTRO_PATH, { |
- 'test.html': '<h1>hello</h1>world<h2>first</h2><h3>inner</h3><h2>second</h2>' |
-}) |
+_TEST_DATA = { |
+ 'api': { |
+ '_manifest_features.json': '{"manifest": "features"}', |
+ '_permission_features.json': '{"permission": "features"}' |
+ }, |
+ 'docs': { |
+ 'templates': { |
+ 'intros': { |
+ 'test.html': '<h1>hi</h1>you<h2>first</h2><h3>inner</h3><h2>second</h2>' |
+ }, |
+ 'json': { |
+ 'api_availabilities.json': '[{"name": "test", "availability": "none"}]', |
+ 'intro_tables.json': '{"test": [{"Permissions": "blue"}]}' |
+ } |
+ } |
+ } |
+} |
class IntroDataSourceTest(unittest.TestCase): |
def setUp(self): |
@@ -19,7 +32,7 @@ class IntroDataSourceTest(unittest.TestCase): |
def testIntro(self): |
intro_data_source = self._server.intro_data_source_factory.Create() |
data = intro_data_source.get('test') |
- self.assertEqual('hello', data['title']) |
+ self.assertEqual('hi', data['title']) |
# TODO(kalman): test links. |
expected_toc = [{'subheadings': [{'link': '', 'title': u'inner'}], |
'link': '', |
@@ -27,7 +40,7 @@ class IntroDataSourceTest(unittest.TestCase): |
{'subheadings': [], 'link': '', 'title': u'second'}] |
self.assertEqual(expected_toc, data['apps_toc']) |
self.assertEqual(expected_toc, data['extensions_toc']) |
- self.assertEqual('world<h2>first</h2><h3>inner</h3><h2>second</h2>', |
+ self.assertEqual('you<h2>first</h2><h3>inner</h3><h2>second</h2>', |
data['intro'].render().text) |
if __name__ == '__main__': |