Ticket 18586

This pull request references https://code.djangoproject.com/ticket/18586, which is primarily concerned with refactoring some overly long tests into more granular coverage. The refactored test suite passes on my system.