The likelihood ratio test of the whole model is based on the degrees of freedom for the model, in this case 2. That is, model DF for 2x2 cross-tabulation is (n1 - 1) + (n2 - 1) = (2 - 1) + (2 - 1) = 2.

The degrees of freedom for the deviance test are based on the hypothesized 'errors' from the model, not the model parameters, that are used to fit the saturated model, in this case 1117. So 2 + 1117 + 1 = 1120 sample size.

Learn it once, use it forever!