def METHOD_NAME(self):
    # see issue 1703
    stream = mock.Mock(spec=StringIO)
    input = StringIO('input_string')
    getpass._raw_input('some_prompt', stream, input=input)
    stream.flush.assert_called_once_with()