To "whistle Dixie" is to speak with unrealistic optimism, as in, "I can name all the capitals, and I ain't just whistling Dixie."