예제 #1
0
 def test_get_all_items(self):
     """
     Test Retrieving all items
     """
     dspace= self.dspace
     items = Item.get_all(dspace)
     self.assertGreater(len(items),0)
예제 #2
0
 def test_get_all_items_with_limit(self):
     """
     Test Retrieving all items with limit
     """
     dspace= self.dspace
     max_items = 5
     items = Item.get_all(dspace,limit=[max_items])
     self.assertLessEqual(len(items),max_items)
예제 #3
0
 def get(self, request,*args,**kwargs):
     items = Item.get_all(self.dspace,**dict(self.request.query_params))
     return Response(items, status=status.HTTP_200_OK)