Coverage for bookie.tests.test_utils.test_fulltext : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""Test the fulltext implementation"""
"""Test that our fulltext classes function"""
"""Setup Tests""" global API_KEY "SELECT api_key FROM users WHERE username = 'admin'").\ fetchone()
"""Tear down each test"""
"""Return the basics for a good add bookmark request""" 'url': u'http://google.com', 'description': u'This is my google desc SEE', 'extended': u'And some extended notes about it in full form', 'tags': u'python search', 'api_key': API_KEY, }
params=req_params)
"""Verify we get the right type of full text store object"""
"Should get a whoosh fulltext by default")
"""Verify that if we store a bookmark we get the fulltext storage""" # first let's add a bookmark we can search on
"Status is 200: " + search_res.status) "We should find our description on the page: " + search_res.body)
"Status is 200: " + search_res.status)
"Tag search should find our description on the page: " + search_res.body)
'/api/v1/admin/bmarks/search/extended%20notes') "Status is 200: " + search_res.status) "Extended search should find our description on the page: " + search_res.body)
"""Verify that if we update a bookmark, fulltext is updated
We need to make sure that updates to the record get cascaded into the fulltext table indexes
"""
# now we need to do another request with updated tag string
"Status is 200: " + search_res.status)
"We should find the new tag icon on the page: " + search_res.body)
"""Verify that we can get a json MorJSON response when ajax search""" # first let's add a bookmark we can search on '/admin/results/google', headers={ 'X-Requested-With': 'XMLHttpRequest', 'Accept': 'application/json' } )
"Status is 200: " + search_res.status)
"We should find our description on the page: " + search_res.body)
# also check for our specific json bits "We should see a success bit in the json: " + search_res.body)
"We should see a payload bit in the json: " + search_res.body)
"We should see a message bit in the json: " + search_res.body) |