Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.5.x] Fixed #19519 again -- Regression in LiveServerTestCase after f…
…d1279a. Backport of 328f5b5.
- Loading branch information
Showing
4 changed files
with
11 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ | |
|
||
from django.conf import settings, UserSettingsHolder | ||
from django.core import mail | ||
from django.core.signals import request_finished | ||
from django.db import close_connection | ||
from django.test.signals import template_rendered, setting_changed | ||
from django.template import Template, loader, TemplateDoesNotExist | ||
from django.template.loaders import cached | ||
|
@@ -70,10 +68,8 @@ def setup_test_environment(): | |
"""Perform any global pre-test setup. This involves: | ||
- Installing the instrumented test renderer | ||
- Setting the email backend to the locmem email backend. | ||
- Set the email backend to the locmem email backend. | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
aaugustin
Author
Member
|
||
- Setting the active locale to match the LANGUAGE_CODE setting. | ||
- Disconnecting the request_finished signal to avoid closing | ||
the database connection within tests. | ||
""" | ||
Template.original_render = Template._render | ||
Template._render = instrumented_test_render | ||
|
@@ -85,8 +81,6 @@ def setup_test_environment(): | |
|
||
deactivate() | ||
|
||
request_finished.disconnect(close_connection) | ||
|
||
|
||
def teardown_test_environment(): | ||
"""Perform any global post-test teardown. This involves: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
why this change? if you wanted to change the tense of this line it should be changed for all the other lines as well, eg "install the instrumented..." It's a very small issue, but you want a quality release, right?! :-)