#NEWLINE# def test_run_once_no_local_device_in_ring( self ) : #NEWLINE# #INDENT# logger = unit . debug_logger ( 'test-replicator' ) #NEWLINE# replicator = TestReplicator ( { #NEWLINE# #INDENT# 'recon_cache_path' : self . recon_cache , #NEWLINE# #UNINDENT# } , logger = logger ) #NEWLINE# with patch ( 'swift.common.db_replicator.whataremyips' , return_value = [ '127.0.0.1' ] ) : #NEWLINE# #INDENT# replicator . run_once ( ) #NEWLINE# #UNINDENT# expected = [ "Can't find itself 127.0.0.1 with port 1000 in ring file, not replicating" ] #NEWLINE# self . assertEqual ( expected , logger . get_lines_for_level ( 'error' ) )