#NEWLINE# def test_is_external_url( self ) : #NEWLINE# #INDENT# r = URLRessources ( ) #NEWLINE# pinger = ExternalUrlsPinger ( self . entry , start_now = False ) #NEWLINE# self . assertEqual ( pinger . is_external_url ( 'http://example.com/' , 'http://google.com/' ) , True ) #NEWLINE# self . assertEqual ( pinger . is_external_url ( 'http://example.com/toto/' , 'http://google.com/titi/' ) , True ) #NEWLINE# self . assertEqual ( pinger . is_external_url ( 'http://example.com/blog/' , 'http://example.com/page/' ) , False ) #NEWLINE# self . assertEqual ( pinger . is_external_url ( ( '%s/blog/' % r . site_url ) , r . site_url ) , False ) #NEWLINE# self . assertEqual ( pinger . is_external_url ( 'http://google.com/' , r . site_url ) , True ) #NEWLINE# self . assertEqual ( pinger . is_external_url ( '/blog/' , r . site_url ) , False )