use LANG=C for running tests comparing human-readable output

This commit is contained in:
Tomas Kopecek 2019-06-14 13:33:51 +02:00 committed by Mike McLean
parent a1be473a6e
commit 6fd33bfd1f
4 changed files with 20 additions and 0 deletions

View file

@ -1,5 +1,6 @@
from __future__ import print_function
from __future__ import absolute_import
import locale
import mock
import os
import six
@ -198,6 +199,9 @@ class CliTestCase(unittest.TestCase):
@mock.patch('koji_cli.commands.activate_session')
def assert_help(self, callableObj, message, activate_session_mock):
# optarse uses gettext directly and it is driven by LANGUAGE
# we need engligsh to get comparable strings
os.environ['LANGUAGE'] = 'en_GB'
self.assert_system_exit(
callableObj,
mock.MagicMock(),