def METHOD_NAME(self):
    # issue 7208
    with mock.patch('os.open') as open, \
            mock.patch('io.FileIO'), \
            mock.patch('io.TextIOWrapper'), \
            mock.patch('termios.tcgetattr'), \
            mock.patch('termios.tcsetattr'):
        open.return_value = 3
        mock_stream = mock.Mock(spec=StringIO)
        getpass.unix_getpass(stream=mock_stream)
        mock_stream.flush.assert_called_with()