#NEWLINE# def test_fix_link( self ) : #NEWLINE# #INDENT# b = self . get_button ( ) #NEWLINE# assert ( b . fix_link ( 'foo.com' ) == 'foo.com' ) #NEWLINE# b = self . get_button ( src = 'src' ) #NEWLINE# assert ( b . fix_link ( 'foo.com' ) == 'foo.com?src=src' ) #NEWLINE# collection = Mock ( ) #NEWLINE# collection . uuid = 'xxx' #NEWLINE# b = self . get_button ( collection = collection ) #NEWLINE# assert ( b . fix_link ( 'foo.com' ) == 'foo.com?collection_id=xxx' ) #NEWLINE# b = self . get_button ( collection = collection , src = 'src' ) #NEWLINE# self . assertUrlEqual ( b . fix_link ( 'foo.com' ) , 'foo.com?src=src&collection_id=xxx' )