#NEWLINE# def test_should_remove_duplicates( ) : #NEWLINE# #INDENT# discoverer1 = Mock ( ) #NEWLINE# discoverer1 . get_oembed_urls . return_value = [ 'http://example.com/oembed?format=json' ] #NEWLINE# discoverer2 = Mock ( ) #NEWLINE# discoverer2 . get_oembed_urls . return_value = [ 'http://example.com/oembed?format=json' , 'http://example.com/oembed?format=xml' ] #NEWLINE# discoverer = discovery . ChainingDiscoverer ( [ discoverer1 , discoverer2 ] ) #NEWLINE# result = discoverer . get_oembed_urls ( 'http://example.com' ) #NEWLINE# assert ( list ( result ) == [ 'http://example.com/oembed?format=json' , 'http://example.com/oembed?format=xml' ] ) #NEWLINE# discoverer1 . get_oembed_urls . assert_called_with ( 'http://example.com' , None ) #NEWLINE# discoverer2 . get_oembed_urls . assert_called_with ( 'http://example.com' , None )