def verify_history(client, fragment, design=None, reverse=False, server_name='beeswax'):
 resp = client.get(('/%(server_name)s/query_history' % {'server_name': server_name}))
 my_assert = ((reverse and assert_false) or assert_true)
 my_assert((fragment in resp.content), resp.content)
 if design:
  my_assert((design in resp.content), resp.content)
 if resp.context:
  try:
   return len(resp.context['page'].object_list)
  except KeyError:
   pass
 LOG.warn('Cannot find history size. Response context clobbered')
 return (-1)

def verify_history ( client , fragment , design = None , reverse = False , server_name = 'beeswax' ) : resp = client . get ( ( '/%(server_name)s/query_history' % { 'server_name' : server_name } ) ) my_assert = ( ( reverse and assert_false ) or assert_true ) my_assert ( ( fragment in resp . content ) , resp . content ) if design : my_assert ( ( design in resp . content ) , resp . content ) if resp . context : try : return len ( resp . context [ 'page' ] . object_list ) except KeyError : pass LOG . warn ( 'Cannot find history size. Response context clobbered' ) return ( - 1 )
verify that the query fragment and/or design are in the query history .