本文整理汇总了Python中mkt.webapps.indexers.WebappIndexer.get_mapping方法的典型用法代码示例。如果您正苦于以下问题:Python WebappIndexer.get_mapping方法的具体用法?Python WebappIndexer.get_mapping怎么用?Python WebappIndexer.get_mapping使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mkt.webapps.indexers.WebappIndexer
的用法示例。
在下文中一共展示了WebappIndexer.get_mapping方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_mapping_properties
# 需要导入模块: from mkt.webapps.indexers import WebappIndexer [as 别名]
# 或者: from mkt.webapps.indexers.WebappIndexer import get_mapping [as 别名]
def test_mapping_properties(self):
# Spot check a few of the key properties.
mapping = WebappIndexer.get_mapping()
keys = mapping['webapp']['properties'].keys()
for k in ('id', 'app_slug', 'category', 'default_locale',
'description', 'device', 'features', 'name', 'status'):
ok_(k in keys, 'Key %s not found in mapping properties' % k)
示例2: test_mapping_properties
# 需要导入模块: from mkt.webapps.indexers import WebappIndexer [as 别名]
# 或者: from mkt.webapps.indexers.WebappIndexer import get_mapping [as 别名]
def test_mapping_properties(self):
# Spot check a few of the key properties.
mapping = WebappIndexer.get_mapping()
keys = mapping["webapp"]["properties"].keys()
for k in (
"id",
"app_slug",
"category",
"default_locale",
"description",
"device",
"features",
"name",
"status",
):
ok_(k in keys, "Key %s not found in mapping properties" % k)
示例3: test_mapping
# 需要导入模块: from mkt.webapps.indexers import WebappIndexer [as 别名]
# 或者: from mkt.webapps.indexers.WebappIndexer import get_mapping [as 别名]
def test_mapping(self):
mapping = WebappIndexer.get_mapping()
eq_(mapping.keys(), ['webapp'])
eq_(mapping['webapp']['_all'], {'enabled': False})
eq_(mapping['webapp']['properties']['boost'],
{'type': 'long', 'doc_values': True})
示例4: test_mapping
# 需要导入模块: from mkt.webapps.indexers import WebappIndexer [as 别名]
# 或者: from mkt.webapps.indexers.WebappIndexer import get_mapping [as 别名]
def test_mapping(self):
mapping = WebappIndexer.get_mapping()
eq_(mapping.keys(), ["webapp"])
eq_(mapping["webapp"]["_all"], {"enabled": False})
eq_(mapping["webapp"]["properties"]["boost"], {"type": "float", "doc_values": True})
示例5: test_mapping
# 需要导入模块: from mkt.webapps.indexers import WebappIndexer [as 别名]
# 或者: from mkt.webapps.indexers.WebappIndexer import get_mapping [as 别名]
def test_mapping(self):
mapping = WebappIndexer.get_mapping()
eq_(mapping.keys(), ['webapp'])
eq_(mapping['webapp']['_all'], {'enabled': False})
eq_(mapping['webapp']['_boost'], {'name': '_boost', 'null_value': 1.0})