#NEWLINE# def test_simplest_search( self ) : #NEWLINE# #INDENT# res = self . client . get ( '/api/1/query?q=banana' ) #NEWLINE# assert ( res . status_code == 200 ) , res #NEWLINE# assert ( res . json [ 'total' ] == 1 ) , res . json #NEWLINE# assert ( '<em>banana</em>' in res . data ) , res . json #NEWLINE# assert ( 'Public Test Source' in res . data ) , res . json #NEWLINE# assert ( 'TOP SECRET' not in res . data ) , res . json #NEWLINE# self . login ( is_admin = True ) #NEWLINE# res = self . client . get ( '/api/1/query?q=banana' ) #NEWLINE# assert ( res . status_code == 200 ) , res #NEWLINE# assert ( res . json [ 'total' ] == 2 ) , res . json #NEWLINE# assert ( 'TOP SECRET' in res . data ) , res . json