def list_documents_by_query(self, query): fields = [ 'document_id', 'document_name', 'author', 'created', 'updated', 'updated_by' ] doc_list = Document.query(query, False, fields) return doc_list
def test_003_query(self): lst_doc = Document.query("project.id:" + Document.default_project, limit=10) doc = lst_doc[0] self.assertIsInstance(doc, Document)