modules moved to use best_parsable_locale (#75250)

* modules moved to use best_parsable_locale

* fixed invocations

* better better

* also module_utils

* converted to function as per fb

* patch testt

* whitespace
This commit is contained in:
Brian Coca
2021-07-15 15:18:01 -04:00
committed by GitHub
parent d527be8a52
commit 61900c7672
18 changed files with 126 additions and 80 deletions

View File

@ -9,9 +9,14 @@ from units.compat import unittest
from ansible.modules import apt_key
def returnc(x):
return 'C'
class AptKeyTestCase(unittest.TestCase):
@mock.patch.object(apt_key, 'apt_key_bin', '/usr/bin/apt-key')
@mock.patch.object(apt_key, 'lang_env', returnc)
@mock.patch.dict(os.environ, {'HTTP_PROXY': 'proxy.example.com'})
def test_import_key_with_http_proxy(self):
m_mock = mock.Mock()