student.tests: Added db access in mock_render_to_response() to test any issues with @transaction.commit_manually
This commit is contained in:
@@ -25,6 +25,9 @@ def mock_render_to_string(template_name, context):
|
||||
|
||||
def mock_render_to_response(template_name, context):
|
||||
"""Return an HttpResponse with content that encodes template_name and context"""
|
||||
# View confirm_email_change uses @transaction.commit_manually.
|
||||
# This simulates any db access in the templates.
|
||||
UserProfile.objects.exists()
|
||||
return HttpResponse(mock_render_to_string(template_name, context))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user