diff options
| author | Claude Paroz <claude@2xlibre.net> | 2019-08-23 10:53:36 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-08-23 10:53:36 +0200 |
| commit | 9386586f31b8a0bccf59a1bff647cd829d4e79aa (patch) | |
| tree | f28bf4c9b8b0a1431c1b6722f9d5bb613d78040f /tests/i18n | |
| parent | 7bd963332017eace00be8caf7dc1b7b304da613a (diff) | |
Replaced subprocess commands by run() wherever possible.
Diffstat (limited to 'tests/i18n')
| -rw-r--r-- | tests/i18n/test_compilation.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/i18n/test_compilation.py b/tests/i18n/test_compilation.py index aa457f21f6..91e0714cec 100644 --- a/tests/i18n/test_compilation.py +++ b/tests/i18n/test_compilation.py @@ -4,7 +4,7 @@ import stat import unittest from io import StringIO from pathlib import Path -from subprocess import Popen +from subprocess import run from unittest import mock from django.core.management import ( @@ -184,7 +184,7 @@ class CompilationErrorHandling(MessageCompilationTests): # Make sure the output of msgfmt is unaffected by the current locale. env = os.environ.copy() env.update({'LANG': 'C'}) - with mock.patch('django.core.management.utils.Popen', lambda *args, **kwargs: Popen(*args, env=env, **kwargs)): + with mock.patch('django.core.management.utils.run', lambda *args, **kwargs: run(*args, env=env, **kwargs)): cmd = MakeMessagesCommand() if cmd.gettext_version < (0, 18, 3): self.skipTest("python-brace-format is a recent gettext addition.") |
