コード例 #1
0
ファイル: tests.py プロジェクト: f14c0/conectate-dspace
 def test_get_community(self):
     """
     Test Retrieving an community by Id
     """
     dspace= self.dspace
     test_id = 2
     community = Community.get_community(dspace,test_id)
     self.assertEqual(community.id,test_id,"Get community by Id Fails")
コード例 #2
0
ファイル: views.py プロジェクト: f14c0/conectate-dspace
 def get_object(self,id,**kwargs):
     try:
         community = Community.get_community(dspace,id,**dict(kwargs))
         return community
     except Community.DoesNotExist:
         raise Http404