#NEWLINE# @ mock . patch ( 'certbot_nginx.configurator.subprocess.Popen' ) #NEWLINE# def test_no_nginx_start( self , mock_popen ) : #NEWLINE# #INDENT# mock_popen . side_effect = OSError ( "Can't find program" ) #NEWLINE# self . assertRaises ( errors . MisconfigurationError , mock_popen . config . restart )