Ejemplo n.º 1
0
 def test_search(self):
     # Test search retrieve
     d = Document({
         "id": "1",
         "title": "document",
         "link": [peerj["html"], peerj["pdf"]]
     })
     d.save()
     res = Document.search(query={'title': 'document'})
     assert_equal(len(res), 1)
Ejemplo n.º 2
0
 def test_search(self):
     d = Document({
         "id":
         "1",
         "title":
         "document",
         "link": [{
             "href": "https://peerj.com/articles/53/",
             "type": "text/html"
         }, {
             "href": "https://peerj.com/articles/53.pdf",
             "type": "application/pdf"
         }],
     })
     d.save()
     res = Document.search(query={'title': 'document'})
     assert_equal(len(res), 1)
Ejemplo n.º 3
0
 def test_search(self):
     d = Document({
         "id": "1",
         "title": "document",
         "link": [
             {
                 "href": "https://peerj.com/articles/53/",
                 "type": "text/html"
             },
             {
                 "href": "https://peerj.com/articles/53.pdf",
                 "type": "application/pdf"
             }
         ],
     })
     d.save()
     res = Document.search(title='document')
     assert_equal(len(res), 1)