summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
authorLoic Bistuer <loic.bistuer@gmail.com>2014-10-20 18:01:03 +0700
committerLoic Bistuer <loic.bistuer@gmail.com>2014-10-22 01:03:15 +0700
commitc34e13e17c664ea43b85572428bcf74c7509db3f (patch)
tree8e19c3d6ea197d3748404a5f32053b67bc745d4e /tests/admin_scripts
parent9f1202c166093160c8796dc570d675415fdf5bf8 (diff)
Fixed #23107 -- Made runserver output respect --no-color.
This commit reverts 67d7da5fb9498b811f0168f5df2308ad4743027f. The previous fix changed the environment globally, which meant that any call to `call_command(no_color=True)` prevented further `call_command` with color. This fix still relies on the environment because it's currently the only way to reach WSGIRequestHandler, but it's now limited to the `runserver` command. This seems an acceptable compromise considering `runserver` runs indefinitely. Thanks Tim Graham for the review.
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index b5eeac713b..2b3f4824fd 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -1397,7 +1397,6 @@ class CommandTypes(AdminScriptTestCase):
out = StringIO()
call_command('color_command', no_color=True, stdout=out)
- self.assertEqual(os.environ.get('DJANGO_COLORS', ''), 'nocolor')
self.assertEqual(out.getvalue(), 'BEGIN\n')
def test_base_command(self):