本文整理汇总了Python中atramhasis.views.views.AtramhasisView.concept_view方法的典型用法代码示例。如果您正苦于以下问题:Python AtramhasisView.concept_view方法的具体用法?Python AtramhasisView.concept_view怎么用?Python AtramhasisView.concept_view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类atramhasis.views.views.AtramhasisView
的用法示例。
在下文中一共展示了AtramhasisView.concept_view方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_not_found
# 需要导入模块: from atramhasis.views.views import AtramhasisView [as 别名]
# 或者: from atramhasis.views.views.AtramhasisView import concept_view [as 别名]
def test_not_found(self):
request = self.request
request.matchdict['scheme_id'] = 'TREES'
request.matchdict['c_id'] = '666'
request.skos_registry = self.regis
error_raised = False
try:
atramhasisview = AtramhasisView(request)
atramhasisview.concept_view()
except ConceptNotFoundException as e:
error_raised = True
self.assertIsNotNone(e.__str__())
self.assertTrue(error_raised)
示例2: test_no_type
# 需要导入模块: from atramhasis.views.views import AtramhasisView [as 别名]
# 或者: from atramhasis.views.views.AtramhasisView import concept_view [as 别名]
def test_no_type(self):
request = self.request
request.matchdict['scheme_id'] = 'TREES'
request.matchdict['c_id'] = '555'
request.skos_registry = self.regis
atramhasisview = AtramhasisView(request)
info = atramhasisview.concept_view()
self.assertEqual(info.status_int, 500)
示例3: test_passing_collection_view
# 需要导入模块: from atramhasis.views.views import AtramhasisView [as 别名]
# 或者: from atramhasis.views.views.AtramhasisView import concept_view [as 别名]
def test_passing_collection_view(self):
request = self.request
request.matchdict['scheme_id'] = 'TREES'
request.matchdict['c_id'] = '3'
request.skos_registry = self.regis
atramhasisview = AtramhasisView(request)
info = atramhasisview.concept_view()
self.assertIsNotNone(info['concept'])
self.assertEqual(info['conceptType'], 'Collection')
self.assertEqual(info['scheme_id'], 'TREES')