Beispiel #1
0
 def test_get_all_collections(self):
     """
     Test Retrieving all collections
     """
     dspace= self.dspace
     collections = Collection.get_all(dspace)
     self.assertGreater(len(collections),0)
Beispiel #2
0
 def test_get_all_collections_with_limit(self):
     """
     Test Retrieving all collections with limit
     """
     dspace= self.dspace
     max_collections = 5
     collections = Collection.get_all(dspace,limit=[max_collections])
     self.assertLessEqual(len(collections),max_collections)
Beispiel #3
0
 def get(self,request,*args,**kwargs):
     collections = Collection.get_all(dspace,**dict(self.request.query_params))
     return Response(collections, status=status.HTTP_200_OK)