#NEWLINE# def check_logcall( logcall ) : #NEWLINE# #INDENT# assert logcall [ 0 ] [ 0 ] . startswith ( 'https://projects.csail.mit.edu/probcomp' ) #NEWLINE# msg = logcall [ 1 ] #NEWLINE# assert ( 'data' in msg ) #NEWLINE# msgdata = msg [ 'data' ] #NEWLINE# assert ( 'User-Agent' in msgdata ) #NEWLINE# assert ( 'session_json' in msgdata ) #NEWLINE# logdata = json . loads ( msgdata [ 'session_json' ] ) #NEWLINE# assert ( 'entries' in logdata ) #NEWLINE# assert ( 'fields' in logdata ) #NEWLINE# assert ( 'version' in logdata ) #NEWLINE# entries = logdata [ 'entries' ] #NEWLINE# the_only_entry = entries [ 0 ] #NEWLINE# assert ( 'test_logged_query_success' == the_only_entry [ 0 ] ) #NEWLINE# assert ( [ 'q' , [ 'b' ] ] == the_only_entry [ 2 ] )