If you are using mock module (written by Michael Foord), in order to mock raw_input function you can use syntax like:
@patch('src.main.raw_input', create=True, new=MagicMock(return_value='y'))
def test_1(self):
method_we_try_to_test(); # method or function that calls **raw_input**