New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #25699 -- Allowed using the test client if 'django.contrib.sessions' isn't in INSTALLED_APPS. #6380

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@sergeykolosov
Contributor

sergeykolosov commented Apr 2, 2016

Follows up #5586.

Now it is possible not only to use test client with custom session apps, but also to use it when django.contrib.sessions is not in INSTALLED_APPS (this covers an existing use-case for those wishing to avoid having an empty sessions table while using non-DB backends).

I've considered suggestion from @javins, and then discussed options with @apollo13 and @freakboy3742.

It seems that the INSTALLED_APPS check can be safely removed. Its origin has been narrowed down to commits 9ba27af and 36b164d.

Also, there's nothing that suggests that an empty dict had been anything but a convenient default value.

Show outdated Hide outdated django/test/client.py Outdated
Show outdated Hide outdated docs/releases/1.10.txt Outdated
Show outdated Hide outdated tests/test_client/tests.py Outdated

@timgraham timgraham changed the title from Fixed #25699 -- Test client support for custom session apps. to Fixed #25699 -- Allowed using the test client if 'django.contrib.sessions' isn't in INSTALLED_APPS. Apr 2, 2016

Show outdated Hide outdated django/test/client.py Outdated
@sergeykolosov

This comment has been minimized.

Show comment
Hide comment
@sergeykolosov

sergeykolosov Apr 3, 2016

Contributor

@timgraham pushed an update covering all your comments

Contributor

sergeykolosov commented Apr 3, 2016

@timgraham pushed an update covering all your comments

@timgraham

This comment has been minimized.

Show comment
Hide comment
@timgraham

timgraham Apr 4, 2016

Member

merged in 21dd98a, thanks!

Member

timgraham commented Apr 4, 2016

merged in 21dd98a, thanks!

@timgraham timgraham closed this Apr 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment