def METHOD_NAME(self):
    with mock.patch('os.open') as open, \
            mock.patch('io.FileIO') as fileio, \
            mock.patch('io.TextIOWrapper') as textio, \
            mock.patch('termios.tcgetattr'), \
            mock.patch('termios.tcsetattr') as tcsetattr, \
            mock.patch('getpass.fallback_getpass') as fallback:
        open.return_value = 3
        fileio.return_value = BytesIO()
        tcsetattr.side_effect = termios.error
        getpass.unix_getpass()
        fallback.assert_called_once_with('Password: ',
                                         textio.return_value)