﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27012	test_nested_requests wipes out pre-test settings	Chris Jerdonek	Chris Jerdonek	"I noticed that `nested_view()` calls `setup_test_environment()` ([https://github.com/django/django/blob/5c63b3e5a797102d915e1683971517f747a28013/tests/test_client_regress/views.py#L62 direct link]):

{{{#!python
def nested_view(request):
    setup_test_environment()
    c = Client()
    c.get(""/no_template_view/"")
    return render(request, 'base.html', {'nested': 'yes'})
}}}

This function is used in the test: test_client_regress.tests.ContextTests.test_nested_requests.

This causes pre-test setting values like `_original_email_backend` and `_original_allowed_hosts` to be wiped out because these values are overwritten by the test values when `setup_test_environment()` is called a second time (see [https://github.com/django/django/blob/5c63b3e5a797102d915e1683971517f747a28013/django/test/utils.py#L97 here] for `setup_test_environment()`).
"	Bug	closed	Testing framework	dev	Normal	fixed			Ready for checkin	1	0	0	0	0	0
