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

Unified Diff: chrome/common/extensions/docs/server2/api_data_source_test.py

Issue 213673002: Add support for "documented_in" annotation in json api schema (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bump version (again) Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/webview_tag.json ('k') | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/api_data_source_test.py
diff --git a/chrome/common/extensions/docs/server2/api_data_source_test.py b/chrome/common/extensions/docs/server2/api_data_source_test.py
index e842576f633e2a6bdc6f37f6529fc99318ade7a0..73c08b4ef916c4bcb5d22387c6b490e19dfa9902 100755
--- a/chrome/common/extensions/docs/server2/api_data_source_test.py
+++ b/chrome/common/extensions/docs/server2/api_data_source_test.py
@@ -64,6 +64,12 @@ class _FakeAPIDataSource(object):
return self._json[key]
+class _FakeNamespace(object):
+
+ def __init__(self):
+ self.documentation_options = {}
+
+
class _FakeAPIModels(object):
def __init__(self, names):
@@ -72,6 +78,9 @@ class _FakeAPIModels(object):
def GetNames(self):
return self._names
+ def GetModel(self, name):
+ return Future(value=_FakeNamespace())
+
class _FakeTemplateCache(object):
@@ -160,15 +169,15 @@ class APIDataSourceTest(unittest.TestCase):
_FakeTemplateCache(),
self._features_bundle,
None).ToDict()
- self.assertEquals(_MakeLink('ref_test.html#type-type2', 'type2'),
+ self.assertEquals(_MakeLink('ref_test#type-type2', 'type2'),
_GetType(dict_, 'type1')['description'])
self.assertEquals(
- 'A %s, or %s' % (_MakeLink('ref_test.html#type-type3', 'type3'),
- _MakeLink('ref_test.html#type-type2', 'type2')),
+ 'A %s, or %s' % (_MakeLink('ref_test#type-type3', 'type3'),
+ _MakeLink('ref_test#type-type2', 'type2')),
_GetType(dict_, 'type2')['description'])
self.assertEquals(
- '%s != %s' % (_MakeLink('other.html#type-type2', 'other.type2'),
- _MakeLink('ref_test.html#type-type2', 'type2')),
+ '%s != %s' % (_MakeLink('other#type-type2', 'other.type2'),
+ _MakeLink('ref_test#type-type2', 'type2')),
_GetType(dict_, 'type3')['description'])
« no previous file with comments | « chrome/common/extensions/api/webview_tag.json ('k') | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698