mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Made (make|compile)messages check for availability of gettext commands.
Refs #19584.
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import sys
|
||||
|
||||
from django.core import management
|
||||
from django.core.management.base import CommandError
|
||||
from django.test import TestCase
|
||||
from django.core.management import CommandError
|
||||
from django.core.management.utils import popen_wrapper
|
||||
from django.test import SimpleTestCase
|
||||
from django.utils import translation
|
||||
from django.utils.six import StringIO
|
||||
|
||||
|
||||
class CommandTests(TestCase):
|
||||
class CommandTests(SimpleTestCase):
|
||||
def test_command(self):
|
||||
out = StringIO()
|
||||
management.call_command('dance', stdout=out)
|
||||
@@ -58,3 +59,9 @@ class CommandTests(TestCase):
|
||||
with translation.override('pl'):
|
||||
management.call_command('leave_locale_alone_true', stdout=out)
|
||||
self.assertEqual(out.getvalue(), "pl\n")
|
||||
|
||||
|
||||
class UtilsTests(SimpleTestCase):
|
||||
|
||||
def test_no_existent_external_program(self):
|
||||
self.assertRaises(CommandError, popen_wrapper, ['a_42_command_that_doesnt_exist_42'])
|
||||
|
||||
Reference in New Issue
Block a user