コード例 #1
0
ファイル: test_node.py プロジェクト: umeboshi2/Kotti
 def test_type_info_unaddable(self):
     from kotti.resources import TypeInfo
     type_info = TypeInfo(add_view=None, addable_to=['Document'])
     context = Mock(type_info=Mock())
     context.type_info.name = 'Document'
     with patch('kotti.resources.view_permitted') as vp:
         res = type_info.addable(context, None)
         assert vp.call_count == 0
コード例 #2
0
ファイル: test_node.py プロジェクト: disko/Kotti
 def test_type_info_unaddable(self):
     from kotti.resources import TypeInfo
     type_info = TypeInfo(add_view=None, addable_to=['Document'])
     context = Mock(type_info=Mock())
     context.type_info.name = 'Document'
     with patch('kotti.resources.view_permitted') as vp:
         res = type_info.addable(context, None)
         assert vp.call_count == 0