#NEWLINE# def test_find_exact_filters_out_none( self ) : #NEWLINE# #INDENT# track1 = Track ( uri = 'dummy1:a' ) #NEWLINE# result1 = SearchResult ( tracks = [ track1 ] ) #NEWLINE# self . library1 . search . return_value . get . return_value = result1 #NEWLINE# self . library2 . search . return_value . get . return_value = None #NEWLINE# result = self . core . library . find_exact ( { #NEWLINE# #INDENT# 'any' : [ 'a' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertIn ( result1 , result ) #NEWLINE# self . assertNotIn ( None , result1 ) #NEWLINE# self . library1 . search . assert_called_once_with ( query = { #NEWLINE# #INDENT# 'any' : [ 'a' ] , #NEWLINE# #UNINDENT# } , uris = None , exact = True ) #NEWLINE# self . library2 . search . assert_called_once_with ( query = { #NEWLINE# #INDENT# 'any' : [ 'a' ] , #NEWLINE# #UNINDENT# } , uris = None , exact = True )