mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #18356 -- Gave the test client signals.template_rendered call a unique dispatch_uid
This prevents the test client context from being lost when the client is used in a nested fashion.
This commit is contained in:
committed by
Tim Graham
parent
453915bb12
commit
0cac4fbf69
@@ -925,6 +925,14 @@ class ContextTests(TestCase):
|
||||
finally:
|
||||
django.template.context._standard_context_processors = None
|
||||
|
||||
def test_nested_requests(self):
|
||||
"""
|
||||
response.context is not lost when view call another view.
|
||||
"""
|
||||
response = self.client.get("/test_client_regress/nested_view/")
|
||||
self.assertEqual(response.context.__class__, Context)
|
||||
self.assertEqual(response.context['nested'], 'yes')
|
||||
|
||||
|
||||
@override_settings(PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',))
|
||||
class SessionTests(TestCase):
|
||||
|
||||
Reference in New Issue
Block a user