mirror of
https://github.com/caronc/apprise.git
synced 2025-03-13 06:18:14 +01:00
Fix flaky test in translation tests (#1298)
Signed-off-by: Dennis Gaebler <dennis.gaebler@uni-ulm.de>
This commit is contained in:
parent
5554360ad0
commit
2226d0692d
@ -297,6 +297,9 @@ def test_apprise_trans_windows_users_nux(mock_getlocale):
|
||||
# 4105 = en_CA
|
||||
windll.kernel32.GetUserDefaultUILanguage.return_value = 4105
|
||||
|
||||
# Store default value to not break other tests
|
||||
default_language = locale.AppriseLocale._default_language
|
||||
|
||||
with environ('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG'):
|
||||
# Our default language
|
||||
locale.AppriseLocale._default_language = 'zz'
|
||||
@ -325,6 +328,9 @@ def test_apprise_trans_windows_users_nux(mock_getlocale):
|
||||
|
||||
delattr(ctypes, 'windll')
|
||||
|
||||
# Restore default value
|
||||
locale.AppriseLocale._default_language = default_language
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform == "win32", reason="Unique Nux test cases")
|
||||
@mock.patch('locale.getlocale')
|
||||
|
Loading…
Reference in New Issue
Block a user