def testSingleArgumentQueries(self): response = LajiStoreAPI.get_all_devices(deviceManufacturerID="ABCD1234567") self.assertGreaterEqual(len(response), 0) response = LajiStoreAPI.get_all_documents(deviceID="ABCDTESTTEST") self.assertGreaterEqual(len(response), 0) response = LajiStoreAPI.get_all_individuals(deleted=True) self.assertGreaterEqual(len(response), 0) response = LajiStoreAPI.get_all_documents(deviceID="NOTFOUND") self.assertEqual(len(response), 0)
def testSingleArgumentQueries(self): response = LajiStoreAPI.get_all_devices(deviceId="ABCD1234567") self.assertGreaterEqual(len(response), 0) response = LajiStoreAPI.get_all_documents(documentId="ABCDTESTTEST") self.assertGreaterEqual(len(response), 0) response = LajiStoreAPI.get_all_individuals(individualId="INDIVIDUALABCD") self.assertGreaterEqual(len(response), 0) response = LajiStoreAPI.get_all_documents(documentId="NOTFOUND") self.assertEqual(len(response), 0)
def testGetAll(self): response = LajiStoreAPI.get_all_documents() self.assertGreaterEqual(len(response), 0) response = LajiStoreAPI.get_all_devices() self.assertGreaterEqual(len(response), 0) response = LajiStoreAPI.get_all_individuals() self.assertGreaterEqual(len(response), 0)
def find(**kwargs): ''' Find all matching documents. :param kwargs: Search parameters. :return: A list of Document objects. ''' data = LajiStoreAPI.get_all_documents(**kwargs) documents = [] for document in data: # creates a list of documents to return documents.append(Document(**document)) return documents
def _get_many(**kwargs): data = LajiStoreAPI.get_all_documents(**kwargs) documents = [] for document in data: # creates a list of documents to return documents.append(Document(**document)) return documents