tests: add check of customized makemessages command (#82927)
gitea/lingo/pipeline/head Build queued...
Details
gitea/lingo/pipeline/head Build queued...
Details
This commit is contained in:
parent
95b53e6fb7
commit
27a4cb79c8
|
@ -0,0 +1,11 @@
|
|||
from unittest import mock
|
||||
|
||||
from django.core.management import call_command
|
||||
|
||||
|
||||
def test_makemessages():
|
||||
with mock.patch('django.core.management.commands.makemessages.Command.handle') as handle:
|
||||
handle.return_value = ''
|
||||
call_command('makemessages')
|
||||
assert handle.call_args[1].get('add_location') == 'file'
|
||||
assert handle.call_args[1].get('no_obsolete') is True
|
Loading…
Reference in New Issue