tests: add check of customized makemessages command (#82927)
gitea/lingo/pipeline/head Build queued... Details

This commit is contained in:
Frédéric Péters 2023-10-29 11:04:17 +01:00
parent 95b53e6fb7
commit 27a4cb79c8
1 changed files with 11 additions and 0 deletions

11
tests/test_misc.py Normal file
View File

@ -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