#NEWLINE# def test_get_editor_ask( monkeypatch ) : #NEWLINE# #INDENT# monkeypatch . delenv ( 'VISUAL' , raising = False ) #NEWLINE# monkeypatch . delenv ( 'EDITOR' , raising = False ) #NEWLINE# with mock . patch ( '__builtin__.raw_input' ) as m : #NEWLINE# #INDENT# m . side_effect = [ '/usr/bin/vim' ] #NEWLINE# res = qisys . interact . get_editor ( ) #NEWLINE# assert ( res == qisys . sh . to_native_path ( '/usr/bin/vim' ) ) #NEWLINE# assert monkeypatch . called