Fixed comparison operator according to PEP8.
Added version specific overrides for get_queryset and get_query_set.
Added new get_permissions_codename check for permissions in upcoming Django 1.8.
Refactored all version checks. All checks are done in tuple format instead of checking for a django major and minor version number.
Removed unused RequestFactory in tests.