Fix #5405 -  Added missing tests for admindocs 

@elvard wrote a code for fixing #5405 and i added missing tests to apply the pull request: https://github.com/django/django/pull/484 

https://code.djangoproject.com/ticket/5405