#NEWLINE# def side_effect( * args , **kwargs ) : #NEWLINE# #INDENT# from twitter import Status #NEWLINE# if ( ( 'term' in kwargs ) and ( kwargs . get ( 'term' ) == 'Non-existant' ) ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# current_directory = os . path . dirname ( os . path . realpath ( __file__ ) ) #NEWLINE# data_file = os . path . join ( current_directory , 'test_data' , 'get_search.json' ) #NEWLINE# tweet_data = open ( data_file ) #NEWLINE# data = json . loads ( tweet_data . read ( ) ) #NEWLINE# tweet_data . close ( ) #NEWLINE# return [ Status . NewFromJsonDict ( x ) for x in data . get ( 'statuses' , '' ) ]