Fixed #23947 -- Django's test suite doesn't pass in reverse order

Fixed inconsistent tests when running Django's test suite with --reverse option.
Hm, not sure. `test_close_deprecated` seems to leave the connection closed. The difference/purpose of the two tests isn't clear to me. d47f794f is the change. We can ask Florian about it if you can't figure it out.