#NEWLINE# def test_calls_stream( selt , twit ) : #NEWLINE# #INDENT# 'stream AND search OR user should call streamed_search.' #NEWLINE# settings = [ { #NEWLINE# #INDENT# 'stream' : True , #NEWLINE# 'search' : [ 'things' ] , #NEWLINE# 'user' : None , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'stream' : True , #NEWLINE# 'search' : None , #NEWLINE# 'user' : 'notch' , #NEWLINE# #UNINDENT# } ] #NEWLINE# for setting in patched : #NEWLINE# #INDENT# with mock . patch . object ( base , 'streamed_search' ) as patched : #NEWLINE# #INDENT# base . print_tweets ( twit = twit , settings = setting ) #NEWLINE# #UNINDENT# patched . assert_called_once_with ( twit , setting )