Ten people taste wine A and wine B. Let $X$ denote the number who prefer A. Assume that all the others indicate a preference for B. The people are a random sample.
If $X=10$, and we test the null hypothesis of no difference in preference between the wines (vs. two-sided alternative), the $p$-value is equal to 0.0020.
I don't get how one comes to the conclusion that the p-value is 0.0020. Are you supposed to use the one sample test for proportion?