当前位置: 首页>>代码示例>>Python>>正文


Python AtramhasisView.search_result方法代码示例

本文整理汇总了Python中atramhasis.views.views.AtramhasisView.search_result方法的典型用法代码示例。如果您正苦于以下问题:Python AtramhasisView.search_result方法的具体用法?Python AtramhasisView.search_result怎么用?Python AtramhasisView.search_result使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在atramhasis.views.views.AtramhasisView的用法示例。


在下文中一共展示了AtramhasisView.search_result方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_no_schema

# 需要导入模块: from atramhasis.views.views import AtramhasisView [as 别名]
# 或者: from atramhasis.views.views.AtramhasisView import search_result [as 别名]
 def test_no_schema(self):
     self.request.matchdict['scheme_id'] = 'GG'
     self.request.params = MultiDict()
     self.request.skos_registry = self.regis
     atramhasisview = AtramhasisView(self.request)
     info = atramhasisview.search_result()
     self.assertEqual(info.status_int, 404)
开发者ID:anukat2015,项目名称:atramhasis,代码行数:9,代码来源:test_views.py

示例2: test_no_querystring

# 需要导入模块: from atramhasis.views.views import AtramhasisView [as 别名]
# 或者: from atramhasis.views.views.AtramhasisView import search_result [as 别名]
 def test_no_querystring(self):
     self.request.matchdict['scheme_id'] = 'TREES'
     self.request.params = MultiDict()
     self.request.skos_registry = self.regis
     atramhasisview = AtramhasisView(self.request)
     info = atramhasisview.search_result()
     self.assertIsNotNone(info['concepts'])
     self.assertEqual(len(info['concepts']), 3)
开发者ID:anukat2015,项目名称:atramhasis,代码行数:10,代码来源:test_views.py

示例3: test_find_by_concept

# 需要导入模块: from atramhasis.views.views import AtramhasisView [as 别名]
# 或者: from atramhasis.views.views.AtramhasisView import search_result [as 别名]
 def test_find_by_concept(self):
     self.request.matchdict['scheme_id'] = 'TREES'
     self.request.params = MultiDict()
     self.request.params.add('ctype', 'concept')
     self.request.params.add('_LOCALE_', 'nl')
     self.request.skos_registry = self.regis
     atramhasisview = AtramhasisView(self.request)
     info = atramhasisview.search_result()
     self.assertIsNotNone(info['concepts'])
     concept = info['concepts'][0]
     self.assertIsNotNone(concept)
     self.assertEqual(info['scheme_id'], 'TREES')
开发者ID:anukat2015,项目名称:atramhasis,代码行数:14,代码来源:test_views.py

示例4: test_find_by_label

# 需要导入模块: from atramhasis.views.views import AtramhasisView [as 别名]
# 或者: from atramhasis.views.views.AtramhasisView import search_result [as 别名]
 def test_find_by_label(self):
     request = testing.DummyRequest()
     request.matchdict['scheme_id'] = 'TREES'
     request.params = MultiDict()
     request.params.add('label', 'De Paardekastanje')
     request.params.add('_LOCALE_', 'nl')
     request.skos_registry = self.regis
     atramhasisview = AtramhasisView(request)
     info = atramhasisview.search_result()
     self.assertIsNotNone(info['concepts'])
     concept = info['concepts'][0]
     self.assertIsNotNone(concept)
     self.assertEqual(concept['label'], 'De Paardekastanje')
     self.assertEqual(info['scheme_id'], 'TREES')
开发者ID:JDeVos,项目名称:atramhasis,代码行数:16,代码来源:test_views.py


注:本文中的atramhasis.views.views.AtramhasisView.search_result方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。